Liferay 7 - custom LoginPreAction / LoginPostAction
Liferay 7 - custom Login Pre/Post Action Overview This article describes how to create custom post/pre login actions in Liferay 7+. Module Creation Create service Liferay module for the LoginPostAction Sample configuration: package name: com.lifedev.login.events service name: CustomLoginPostAction module name: login-post-action Defining dependencies Define dependencies in build.gradle file: dependencies { compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" compileOnly group: "javax.servlet", name: "javax.servlet-api" } Defining OSGi metadata Define OSGi metadata in bnd.bnd , sample: Bundle-Name: LifeDev Login Post Action Bundle-SymbolicName: com.lifedev.login.events Bundle-Version: 1.0.0 LoginPostAction implementation Implement CustomLoginP...