Class BaseAuthenticationExtension
java.lang.Object
com.axemble.vdoc.sdk.authentication.base.BaseAuthenticationExtension
- All Implemented Interfaces:
- Serializable
This class is the abstract class for authentication extensions
- Author:
- omenuel
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Subjectfinal IUserGet authenticated user from session or user account for disconnectionfinal Stringfinal Stringfinal Stringfinal Stringvoidinit(CallbackHandler callbackHandler, org.apache.turbine.util.RunData data, org.apache.turbine.services.security.UserAccount uac) Initialize extensionfinal booleanfinal booleanbooleanThis method is called before authentication It should return true to continue authentification, false to stop authentication processbooleanThis method is called before authentication It should return true to continue authentification, false to stop authentication processvoidThis method is called when disconnecting (either manually, or from session timeout) : see isAutoLogoutprotected final voidoverwriteAuthenticatedUser(String login) Authenticate the user If run before authentication, the authentication process will stopprotected final voidoverwriteLoginEntered(String newLogin) Modify the entered login : should be used before authentification onlyprotected final voidoverwritePasswordEntered(String newPassword) Modify the entered password : should be used before authentification onlyvoidrelease()Release the extensionfinal voidsetErrorMessage(String message) final voidsetInfoMessage(String message) final voidsetRedirectUri(String uri) Redirect the user (does not work for Dav or auto logout)
- 
Field Details- 
LOGGERpublic static final com.axemble.vdp.utils.Logger LOGGER
 
- 
- 
Constructor Details- 
BaseAuthenticationExtensionpublic BaseAuthenticationExtension()
 
- 
- 
Method Details- 
initpublic void init(CallbackHandler callbackHandler, org.apache.turbine.util.RunData data, org.apache.turbine.services.security.UserAccount uac) Initialize extension- Parameters:
- callbackHandler-
- data-
- httpSession- (required, because the request and the data can be null for auto logout)
 
- 
releasepublic void release()Release the extension
- 
onBeforeAuthenticatepublic boolean onBeforeAuthenticate()This method is called before authentication It should return true to continue authentification, false to stop authentication process- Returns:
 
- 
onAfterAuthenticatepublic boolean onAfterAuthenticate()This method is called before authentication It should return true to continue authentification, false to stop authentication process- Returns:
 
- 
onDisconnectpublic void onDisconnect()This method is called when disconnecting (either manually, or from session timeout) : see isAutoLogout
- 
overwriteLoginEnteredModify the entered login : should be used before authentification only- Parameters:
- newLogin-
 
- 
overwritePasswordEnteredModify the entered password : should be used before authentification only- Parameters:
- newLogin-
 
- 
overwriteAuthenticatedUserAuthenticate the user If run before authentication, the authentication process will stop- Parameters:
- user-
- Throws:
- Exception
 
- 
isAutoLoginpublic final boolean isAutoLogin()- Returns:
- true if the authentication is a Autologin authentication (no login/password), false if login/password are present
 
- 
isAutoLogoutpublic final boolean isAutoLogout()- Returns:
- true if the disconnection has been made by a session timeout
 
- 
getAuthenticatedSubject- Returns:
- authenticated subject from session
 
- 
getAuthenticatedUserGet authenticated user from session or user account for disconnection- Returns:
- Throws:
- DirectoryModuleException
 
- 
getRequest- Returns:
- the request : can be null for auto logout
 
- 
getProtocol- Returns:
- the protocol : web or webdav
- See Also:
 
- 
getLoginEntered- Returns:
- login entered by the user for login password login
 
- 
getPasswordEntered- Returns:
- password entered by the user for login password login
 
- 
getErrorMessage- Returns:
- the error message set by the authentication module
 
- 
setErrorMessage
- 
setInfoMessage
- 
setRedirectUriRedirect the user (does not work for Dav or auto logout)- Parameters:
- uri-
 
 
-