Class LoggingAuthenticationHandler
java.lang.Object
com.jalios.jcms.authentication.AuthenticationHandler
com.jalios.jcms.authentication.handlers.LoggingAuthenticationHandler
- All Implemented Interfaces:
PluginComponent,Comparable<AuthenticationHandler>
Provide logging of the authentication process using log4j.
This authentication handler must be the first in the list of authentication handlers to be able to log authentication made by other handlers.
This authentication handler must be the first in the list of authentication handlers to be able to log authentication made by other handlers.
- Since:
- jcms-5.7.0
- Author:
- Olivier Jaquemet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intOrder used by the LoggingAuthenticationHandlerFields inherited from class com.jalios.jcms.authentication.AuthenticationHandler
channel, GENERIC_BAD_AUTHENTICATION_MSG -
Method Summary
Modifier and TypeMethodDescriptionstatic final LoggingAuthenticationHandlervoidlogin(AuthenticationContext ctxt) Authenticate a member.voidlogout(AuthenticationContext ctxt) This methods is called when users logout from JCMS.Methods inherited from class com.jalios.jcms.authentication.AuthenticationHandler
canLogout, compareTo, equals, getOrder, init, loadProperties, setOrder
-
Field Details
-
ORDER_LOGGING_HANDLER
public static final int ORDER_LOGGING_HANDLEROrder used by the LoggingAuthenticationHandler- See Also:
-
-
Method Details
-
getInstance
-
login
Description copied from class:AuthenticationHandlerAuthenticate a member.
This method is invoked by the authentication chain on each request.
A typical implementation of this method would follow the following pattern :- Examine informations required to perform the authentication through
the
AuthenticationContextobject (request, response, login.. etc) - Perform your authentication before chain invokation and set the logged Member
AuthenticationContext.setLoggedMember(com.jalios.jcms.Member) - a) Either invoke the next entity in the chain using
AuthenticationContext.doChain(), - b) or else skip the chain invokation and block other authentication handler of the chain (do this with caution...)
- Perform redirection, set information/warning/error message or any
other process, after chain invokation, using
AuthenticationContext.
Default implementation is to invoke the next handler in the chain.- Overrides:
loginin classAuthenticationHandler- Parameters:
ctxt- theAuthenticationContextused for this login- Throws:
IOException
- Examine informations required to perform the authentication through
the
-
logout
Description copied from class:AuthenticationHandlerThis methods is called when users logout from JCMS.
It may not be called if user simply close its browser. Don't rely on this for critical operation
Default implementation is to invoke the next handler in the chain.- Overrides:
logoutin classAuthenticationHandler- Parameters:
ctxt- theAuthenticationContextused for this login- Throws:
IOException
-