public abstract class BaseAuthenticationExtension extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
class |
BaseAuthenticationExtension.Protocol |
Modifier and Type | Field and Description |
---|---|
static com.axemble.vdp.utils.Logger |
LOGGER |
Constructor and Description |
---|
BaseAuthenticationExtension() |
Modifier and Type | Method and Description |
---|---|
Subject |
getAuthenticatedSubject() |
IUser |
getAuthenticatedUser()
Get authenticated user from session or user account for disconnection
|
String |
getErrorMessage() |
String |
getLoginEntered() |
String |
getPasswordEntered() |
String |
getProtocol() |
IExecutionContext.IRequest |
getRequest() |
void |
init(CallbackHandler callbackHandler,
org.apache.turbine.util.RunData data,
org.apache.turbine.services.security.UserAccount uac)
Initialize extension
|
boolean |
isAutoLogin() |
boolean |
isAutoLogout() |
boolean |
onAfterAuthenticate()
This method is called before authentication
It should return true to continue authentification, false to stop authentication process
|
boolean |
onBeforeAuthenticate()
This method is called before authentication
It should return true to continue authentification, false to stop authentication process
|
void |
onDisconnect()
This method is called when disconnecting (either manually, or from session timeout) : see isAutoLogout
|
protected void |
overwriteAuthenticatedUser(String login)
Authenticate the user
If run before authentication, the authentication process will stop
|
protected void |
overwriteLoginEntered(String newLogin)
Modify the entered login : should be used before authentification only
|
protected void |
overwritePasswordEntered(String newPassword)
Modify the entered password : should be used before authentification only
|
void |
release()
Release the extension
|
void |
setErrorMessage(String message) |
void |
setInfoMessage(String message) |
void |
setRedirectUri(String uri)
Redirect the user (does not work for Dav or auto logout)
|
public void init(CallbackHandler callbackHandler, org.apache.turbine.util.RunData data, org.apache.turbine.services.security.UserAccount uac)
callbackHandler
- data
- httpSession
- (required, because the request and the data can be null for auto logout)public void release()
public boolean onBeforeAuthenticate()
public boolean onAfterAuthenticate()
public void onDisconnect()
protected final void overwriteLoginEntered(String newLogin)
newLogin
- protected final void overwritePasswordEntered(String newPassword)
newLogin
- protected final void overwriteAuthenticatedUser(String login) throws Exception
user
- Exception
public final boolean isAutoLogin()
public final boolean isAutoLogout()
public final Subject getAuthenticatedSubject()
public final IUser getAuthenticatedUser() throws DirectoryModuleException
DirectoryModuleException
public final IExecutionContext.IRequest getRequest()
public final String getProtocol()
BaseAuthenticationExtension.Protocol
public final String getLoginEntered()
public final String getPasswordEntered()
public final String getErrorMessage()
public final void setErrorMessage(String message)
public final void setInfoMessage(String message)
public final void setRedirectUri(String uri)
uri
- Copyright © 2021 Visiativ Software. All rights reserved.