Class BasicAuthenticator

java.lang.Object
org.eclipse.jetty.security.authentication.LoginAuthenticator
org.eclipse.jetty.security.authentication.BasicAuthenticator
All Implemented Interfaces:
Authenticator

public class BasicAuthenticator extends LoginAuthenticator
  • Constructor Details

    • BasicAuthenticator

      public BasicAuthenticator()
  • Method Details

    • getCharset

      public Charset getCharset()
    • setCharset

      public void setCharset(Charset charset)
    • getAuthenticationType

      public String getAuthenticationType()
      Returns:
      The name of the authentication type
    • validateRequest

      public AuthenticationState validateRequest(org.eclipse.jetty.server.Request req, org.eclipse.jetty.server.Response res, org.eclipse.jetty.util.Callback callback) throws ServerAuthException
      Description copied from interface: Authenticator
      Validate a request
      Parameters:
      req - The request
      res - The response
      callback - the callback to use for writing a response
      Returns:
      An Authentication. If Authentication is successful, this will be a AuthenticationState.Succeeded. If a response has been sent by the Authenticator (which can be done for both successful and unsuccessful authentications), then the result will implement AuthenticationState.ResponseSent.
      Throws:
      ServerAuthException - if unable to validate request
    • authorization

      public static String authorization(String user, String password)