public abstract void init() throws LoginException |
This method must be overridden. It is called each time an authentication session is started. If the initialization of the module fails, the LoginException should be thrown.
Overrides: init in class Authenicator
public abstract void validate() throws LoginException |
This method must be overridden. It is called once for each authentication page that is specified in the authentication modules properties file. The various getToken methods may be used to get the values for the user-entered tokens and passwords. LoginException should be thrown at some point during the validate() method if authentication has failed. The message in the exception is logged and users are sent an Authentication Failed page. If no exception is thrown, which implies successful completion, and all authentication pages have been sent, the user is authenticated. The abstract method getUserTokenId() is called to get the authenticated name of the user.
Overrides: validate in class Authenticator
public abstract String getUserTokenId() |
This method must overridden. It is called once after the all authentication pages have been sent to the user.
Overrides: getUserTokenId in class Authenticator
public String getSessionId() |
This method returns a unique key for this authentication session.
public int getCurrentState() |
This method returns the current state in the authentication process.
public int getNumberOfTokens() |
This method returns the total number of tokens and passwords in the current authentication state.
public int getNumberOfTokensForState(int stateNumber) |
This method returns the total number of tokens and passwords for the given authentication state. This method may be used to get token values from previous authentication states.
public String getToken(int index) |
This method returns the user-entered value for the specified token in the current authentication state.
public String[] getToken() |
This method returns the user-entered value for the first token in the current authentication state.
public String[] getAllTokens() |
This method returns all the user-entered tokens in the current authentication state.
public String[] getAllTokensForState(int stateNumber) |
Returns all the user-entered tokens in the specified authentication state.
public int getNumberOfStates() |
This method returns the number of authentication states for this authentication module.
public void setReplaceText(int token, String text) |
The tokens and passwords have text descriptions for each authentication page. If your module needs to add to these descriptions, this can be done by inserting the keyword into the description. This method can then be used to substitute the specified text with generated dynamic text.
This method should be called for the next state, before returning from the validate method().
public void setReplaceText(int token, String text[]) |
Same as setReplaceText(), but allows replacement of multiple text strings.
public void logout() |
Not implemented. This method is a placeholder. It will be called when a user logs out.