Interface UserAuthenticationListener
-
- All Superinterfaces:
EventListener
,Initialization
- All Known Implementing Classes:
ChatUserAuthenticationListener
public interface UserAuthenticationListener extends EventListener, Initialization
This event listener is fired when a user has just been logged in.
Each implementation of this listener has to be registered by callingUserAuthenticationListenerRegistration.register(UserAuthenticationListener)
.
A tip to perform the registration is to implementInitialization
interface. Indeed, each class, that implements it, is called one time at server start.
(See QuickInfoUserAuthenticationListener for example)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
firstHomepageAccessAfterAuthentication(javax.servlet.http.HttpServletRequest request, User user, String finalURL)
This method is called just before redirecting the user to the home page, after a successful authentication.
If it is necessary, the redirection can be overridden...default String
homepageAccessFromLoginWhenUserSessionAlreadyOpened(javax.servlet.http.HttpServletRequest request, User user, String finalURL)
This method is called just before redirecting the user to the home page, from the login access with an user session already opened.
If it is necessary, the redirection can be overridden...default void
init()
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.default void
release()
Releases the previously initialized resources at Silverpeas shutdown.-
Methods inherited from interface org.silverpeas.core.initialization.Initialization
getPriority
-
-
-
-
Method Detail
-
init
default void init() throws Exception
Description copied from interface:Initialization
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.- Specified by:
init
in interfaceInitialization
- Throws:
Exception
- if an error occurs during the initialization process. In this case the Silverpeas startup fails.
-
release
default void release() throws Exception
Description copied from interface:Initialization
Releases the previously initialized resources at Silverpeas shutdown. The implementation of this method is optional. By default it does nothing.- Specified by:
release
in interfaceInitialization
- Throws:
Exception
- if an error occurs during the shutdown process. In this case, a log will be outputed and the shutdown goes one.
-
firstHomepageAccessAfterAuthentication
String firstHomepageAccessAfterAuthentication(javax.servlet.http.HttpServletRequest request, User user, String finalURL)
This method is called just before redirecting the user to the home page, after a successful authentication.
If it is necessary, the redirection can be overridden...- Parameters:
request
- the current user request.user
- the current user.finalURL
- the initial URL of user redirection, just after a successful authentication.- Returns:
- the overridden url redirection, or null if no override.
-
homepageAccessFromLoginWhenUserSessionAlreadyOpened
default String homepageAccessFromLoginWhenUserSessionAlreadyOpened(javax.servlet.http.HttpServletRequest request, User user, String finalURL)
This method is called just before redirecting the user to the home page, from the login access with an user session already opened.
If it is necessary, the redirection can be overridden...- Parameters:
request
- the current user request.user
- the current user.finalURL
- the initial URL of user redirection, just after a successful authentication.- Returns:
- the overridden url redirection, or null if no override.
-
-