Class AbstractAuthenticationProvider

  • Direct Known Subclasses:
    DefaultAuthenticationProvider, LdapAuthenticationProvider

    public abstract class AbstractAuthenticationProvider
    extends Object
    Defines the general behavior of the classes that will authenticate users against different providers, such an Active Directory or the built-in database.
    Author:
    Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
    • Constructor Detail

      • AbstractAuthenticationProvider

        public AbstractAuthenticationProvider()
    • Method Detail

      • configureProvider

        public abstract void configureProvider​(HashMap<String,​Object> parameters)
                                        throws AuthenticationException
        Sets the parameters necessary for the authentication to work (database handle, Active Directory settings, etc).
        Parameters:
        parameters - The set of parameters. The implementor must document what is required.
        Throws:
        AuthenticationException - If something goes wrong, most likely, the parameters are insufficient or not correct.
      • login

        public abstract Session login​(String user,
                                      String password,
                                      int sessionType,
                                      String ipAddress)
                               throws AuthenticationException
        Attempts to authenticate a user.
        Parameters:
        user - The user.
        password - The password.
        sessionType - The session type (web, desktop, web service, other)
        ipAddress - The IP address the login request comes from.
        Returns:
        A session object containing the user profile and its privileges, basically.
        Throws:
        AuthenticationException - If the authentication process is incorrect.