Class BaseAuthenticationExtension

java.lang.Object
com.axemble.vdoc.sdk.authentication.base.BaseAuthenticationExtension
All Implemented Interfaces:
Serializable

public abstract class BaseAuthenticationExtension extends Object implements Serializable
This class is the abstract class for authentication extensions
Author:
omenuel
See Also:
  • 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

      protected final void overwriteLoginEntered(String newLogin)
      Modify the entered login : should be used before authentification only
      Parameters:
      newLogin -
    • overwritePasswordEntered

      protected final void overwritePasswordEntered(String newPassword)
      Modify the entered password : should be used before authentification only
      Parameters:
      newLogin -
    • overwriteAuthenticatedUser

      protected final void overwriteAuthenticatedUser(String login) throws Exception
      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

      public final Subject getAuthenticatedSubject()
      Returns:
      authenticated subject from session
    • getAuthenticatedUser

      public final IUser getAuthenticatedUser() throws DirectoryModuleException
      Get authenticated user from session or user account for disconnection
      Returns:
      Throws:
      DirectoryModuleException
    • getRequest

      public final IExecutionContext.IRequest getRequest()
      Returns:
      the request : can be null for auto logout
    • getProtocol

      public final String getProtocol()
      Returns:
      the protocol : web or webdav
      See Also:
    • getLoginEntered

      public final String getLoginEntered()
      Returns:
      login entered by the user for login password login
    • getPasswordEntered

      public final String getPasswordEntered()
      Returns:
      password entered by the user for login password login
    • getErrorMessage

      public final String getErrorMessage()
      Returns:
      the error message set by the authentication module
    • setErrorMessage

      public final void setErrorMessage(String message)
    • setInfoMessage

      public final void setInfoMessage(String message)
    • setRedirectUri

      public final void setRedirectUri(String uri)
      Redirect the user (does not work for Dav or auto logout)
      Parameters:
      uri -