Package alpine.auth
Class Authenticator
- java.lang.Object
-
- alpine.auth.Authenticator
-
public class Authenticator extends Object
Class is responsible for authenticating managed users against the internal user database and optionally against a configured directory service (LDAP).- Since:
- 1.0.0
- Author:
- Steve Springett
- See Also:
AuthenticationService,ManagedUserAuthenticationService,LdapAuthenticationService
-
-
Constructor Summary
Constructors Constructor Description Authenticator(String username, String password)Constructs a new Authenticator object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principalauthenticate()Attempts to authenticate the credentials internally first and if not successful, checks to see if LDAP is enabled or not.
-
-
-
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
-
-