Package alpine.auth
Class ManagedUserAuthenticationService
- java.lang.Object
-
- alpine.auth.ManagedUserAuthenticationService
-
- All Implemented Interfaces:
AuthenticationService
public class ManagedUserAuthenticationService extends Object implements AuthenticationService
Class that performs authentication against internally managed users.- Since:
- 1.0.0
- Author:
- Steve Springett
-
-
Constructor Summary
Constructors Constructor Description ManagedUserAuthenticationService(String username, String password)Authentication service validates credentials against internally managed users.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principalauthenticate()Authenticates the username/password combo against the directory service and returns a Principal if authentication is successful.booleanisSpecified()Returns whether the username/password combo was specified or not.
-
-
-
Method Detail
-
isSpecified
public boolean isSpecified()
Returns whether the username/password combo was specified or not. In this case, since the constructor requires it, this method will always return true.- Specified by:
isSpecifiedin interfaceAuthenticationService- Returns:
- always will return true
- Since:
- 1.0.0
-
authenticate
public Principal authenticate() throws AlpineAuthenticationException
Authenticates the username/password combo against the directory service and returns a Principal if authentication is successful. Otherwise, returns an AuthenticationException.- Specified by:
authenticatein interfaceAuthenticationService- Returns:
- a Principal if authentication was successful
- Throws:
AlpineAuthenticationException- when authentication is unsuccessful- Since:
- 1.0.0
-
-