Class LoginAuthenticator

java.lang.Object
org.eclipse.jetty.security.authentication.LoginAuthenticator
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
BasicAuthenticator, DigestAuthenticator, FormAuthenticator, SPNEGOAuthenticator, SslClientCertAuthenticator

public abstract class LoginAuthenticator extends Object implements Authenticator
  • Field Details

  • Constructor Details

    • LoginAuthenticator

      protected LoginAuthenticator()
  • Method Details

    • login

      public UserIdentity login(String username, Object password, org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response)
      If the UserIdentity returned from LoginService.login(String, Object, Request, Function) is not null, it is assumed that the user is fully authenticated and we need to change the session id to prevent session fixation vulnerability. If the UserIdentity is not necessarily fully authenticated, then subclasses must override this method and determine when the UserIdentity IS fully authenticated and renew the session id.
      Parameters:
      username - the username of the client to be authenticated
      password - the user's credential
      request - the inbound request that needs authentication
    • logout

      public void logout(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response)
    • setConfiguration

      public void setConfiguration(Authenticator.Configuration configuration)
      Description copied from interface: Authenticator
      Configure the Authenticator
      Specified by:
      setConfiguration in interface Authenticator
      Parameters:
      configuration - the configuration
    • getLoginService

      public LoginService getLoginService()
    • updateSession

      protected void updateSession(org.eclipse.jetty.server.Request httpRequest, org.eclipse.jetty.server.Response httpResponse)
      Update the session on authentication. The session is changed to a new instance with a new ID if and only if:
      Parameters:
      httpRequest - the request
      httpResponse - the response
      See Also: