Enum Class AuthSettings.AuthLevel

java.lang.Object
java.lang.Enum<AuthSettings.AuthLevel>
google.registry.request.auth.AuthSettings.AuthLevel
All Implemented Interfaces:
Serializable, Comparable<AuthSettings.AuthLevel>, Constable
Enclosing class:
AuthSettings

public static enum AuthSettings.AuthLevel extends Enum<AuthSettings.AuthLevel>
Authentication level.

Used by Auth to specify what authentication is required, and by AuthResult to specify what authentication was found. These are a series of levels, from least to most authentication required. The lowest level of requirement, NONE, can be satisfied by any level of authentication, while the highest level, USER, can only be satisfied by the authentication of a specific user. The level returned may be higher than what was required, if more authentication turns out to be possible. For instance, if an authenticated user is found, USER will be returned even if no authentication was required.

  • Enum Constant Details

    • NONE

      public static final AuthSettings.AuthLevel NONE
      No authentication was required/found.
    • APP

      public static final AuthSettings.AuthLevel APP
      Authentication required, but user not required.

      In Auth: authentication is required, but App-internal authentication (which isn't associated with a specific user, but a service account) is permitted. Examples include requests from Cloud Tasks, Cloud Scheduler, and the proxy.

      In AuthResult: App-internal authentication (via service accounts) was successful.

    • USER

      public static final AuthSettings.AuthLevel USER
      Authentication required, user required.

      In Auth: Authentication is required, and app-internal authentication is forbidden, meaning that a valid authentication result will contain specific user information.

      In AuthResult: A valid user was authenticated.

  • Method Details

    • values

      public static AuthSettings.AuthLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AuthSettings.AuthLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null