Package alpine.auth

Class Authenticator

    • Constructor Detail

      • Authenticator

        public Authenticator​(String username,
                             String password)
        Constructs a new Authenticator object.
        Parameters:
        username - the username to assert
        password - the password to assert
    • Method Detail

      • authenticate

        public Principal authenticate()
                               throws AlpineAuthenticationException
        Attempts to authenticate the credentials internally first and if not successful, checks to see if LDAP is enabled or not. If enabled, a second attempt to authenticate the credentials will be made, but this time against the directory service.
        Returns:
        a Principal upon successful authentication
        Throws:
        AlpineAuthenticationException - upon authentication failure
        Since:
        1.0.0