Class UniversalAuthBackend

java.lang.Object
com.google.gerrit.server.auth.UniversalAuthBackend
All Implemented Interfaces:
AuthBackend

public final class UniversalAuthBackend extends Object implements AuthBackend
Universal implementation of the AuthBackend that works with the injected set of AuthBackends.
  • Method Details

    • authenticate

      public AuthUser authenticate(AuthRequest request) throws AuthException
      Description copied from interface: AuthBackend
      Authenticate inspects the AuthRequest and returns authenticated user. If the request is unable to be authenticated, an exception will be thrown. The MissingCredentialsException must be thrown when there are no credentials for the request. It is expected that at most one AuthBackend will either return an AuthUser or throw a non-MissingCredentialsException.
      Specified by:
      authenticate in interface AuthBackend
      Parameters:
      request - the object describing the request.
      Returns:
      the successfully authenticated user.
      Throws:
      MissingCredentialsException - when there are no credentials.
      InvalidCredentialsException - when the credentials are present and invalid.
      UnknownUserException - when the credentials are valid but there is no matching user.
      UserNotAllowedException - when the credentials are valid but the user is not allowed.
      AuthException - when any other error occurs.
    • getDomain

      public String getDomain()
      Description copied from interface: AuthBackend
      Returns an identifier that uniquely describes the backend.
      Specified by:
      getDomain in interface AuthBackend