Package alpine.server.auth
Class ManagedUserAuthenticationService
java.lang.Object
alpine.server.auth.ManagedUserAuthenticationService
- All Implemented Interfaces:
AuthenticationService
Class that performs authentication against internally managed users.
- Since:
- 1.0.0
- Author:
- Steve Springett
-
Constructor Summary
ConstructorsConstructorDescriptionManagedUserAuthenticationService(String username, String password) Authentication service validates credentials against internally managed users. -
Method Summary
Modifier and TypeMethodDescriptionAuthenticates the username/password combo against the directory service and returns a Principal if authentication is successful.booleanReturns whether the username/password combo was specified or not.
-
Constructor Details
-
ManagedUserAuthenticationService
Authentication service validates credentials against internally managed users.- Parameters:
username- the asserted usernamepassword- the asserted password- Since:
- 1.0.0
-
-
Method Details
-
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
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
-