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 Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Subject
final IUser
Get authenticated user from session or user account for disconnectionfinal String
final String
final String
final String
void
init
(CallbackHandler callbackHandler, org.apache.turbine.util.RunData data, org.apache.turbine.services.security.UserAccount uac) Initialize extensionfinal boolean
final boolean
boolean
This method is called before authentication It should return true to continue authentification, false to stop authentication processboolean
This method is called before authentication It should return true to continue authentification, false to stop authentication processvoid
This method is called when disconnecting (either manually, or from session timeout) : see isAutoLogoutprotected final void
overwriteAuthenticatedUser
(String login) Authenticate the user If run before authentication, the authentication process will stopprotected final void
overwriteLoginEntered
(String newLogin) Modify the entered login : should be used before authentification onlyprotected final void
overwritePasswordEntered
(String newPassword) Modify the entered password : should be used before authentification onlyvoid
release()
Release the extensionfinal void
setErrorMessage
(String message) final void
setInfoMessage
(String message) final void
setRedirectUri
(String uri) Redirect the user (does not work for Dav or auto logout)
-
Field Details
-
LOGGER
public static final com.axemble.vdp.utils.Logger LOGGER
-
-
Constructor Details
-
BaseAuthenticationExtension
public BaseAuthenticationExtension()
-
-
Method Details
-
init
public 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)
-
release
public void release()Release the extension -
onBeforeAuthenticate
public boolean onBeforeAuthenticate()This method is called before authentication It should return true to continue authentification, false to stop authentication process- Returns:
-
onAfterAuthenticate
public boolean onAfterAuthenticate()This method is called before authentication It should return true to continue authentification, false to stop authentication process- Returns:
-
onDisconnect
public void onDisconnect()This method is called when disconnecting (either manually, or from session timeout) : see isAutoLogout -
overwriteLoginEntered
Modify the entered login : should be used before authentification only- Parameters:
newLogin
-
-
overwritePasswordEntered
Modify the entered password : should be used before authentification only- Parameters:
newLogin
-
-
overwriteAuthenticatedUser
Authenticate the user If run before authentication, the authentication process will stop- Parameters:
user
-- Throws:
Exception
-
isAutoLogin
public final boolean isAutoLogin()- Returns:
- true if the authentication is a Autologin authentication (no login/password), false if login/password are present
-
isAutoLogout
public final boolean isAutoLogout()- Returns:
- true if the disconnection has been made by a session timeout
-
getAuthenticatedSubject
- Returns:
- authenticated subject from session
-
getAuthenticatedUser
Get 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
-
setRedirectUri
Redirect the user (does not work for Dav or auto logout)- Parameters:
uri
-
-