Enum Class AuthSettings.AuthLevel
- All Implemented Interfaces:
Serializable
,Comparable<AuthSettings.AuthLevel>
,Constable
- Enclosing class:
AuthSettings
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthSettings.AuthLevel
Returns the enum constant of this class with the specified name.static AuthSettings.AuthLevel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No authentication was required/found. -
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
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
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
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 nameNullPointerException
- if the argument is null
-