Class ManagedUserAuthenticationService

java.lang.Object
alpine.server.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 Details

    • ManagedUserAuthenticationService

      public ManagedUserAuthenticationService(String username, String password)
      Authentication service validates credentials against internally managed users.
      Parameters:
      username - the asserted username
      password - 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:
      isSpecified in interface AuthenticationService
      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:
      authenticate in interface AuthenticationService
      Returns:
      a Principal if authentication was successful
      Throws:
      AlpineAuthenticationException - when authentication is unsuccessful
      Since:
      1.0.0