com.google.api.server.spi.config
Enum AuthLevel
- java.lang.Object
-
- java.lang.Enum<AuthLevel>
-
- com.google.api.server.spi.config.AuthLevel
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<AuthLevel>
public enum AuthLevel extends java.lang.Enum<AuthLevel>
Enum to choose frontend authentication level for use in endpoints annotations. Frontend authentication is handled by a Google API server prior to the request reaching backends. An early return before hitting the backend can happen if the request does not fulfill the requirement specified by the AuthLevel.
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description NONE
Frontend authentication will be skipped.OPTIONAL
Authentication is optional.OPTIONAL_CONTINUE
Authentication is optional and will be attempted if authentication credential are supplied.REQUIRED
Valid authentication credentials are required.UNSPECIFIED
Unspecified; AuthLevel is system default if there is any.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static AuthLevel
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AuthLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REQUIRED
public static final AuthLevel REQUIRED
Valid authentication credentials are required.
-
OPTIONAL
public static final AuthLevel OPTIONAL
Authentication is optional. If authentication credentials are supplied they must be valid.
-
OPTIONAL_CONTINUE
public static final AuthLevel OPTIONAL_CONTINUE
Authentication is optional and will be attempted if authentication credential are supplied. The request can still reach backend if authentication failed.
-
NONE
public static final AuthLevel NONE
Frontend authentication will be skipped. Existing authentication in cloud endpoints still applies.
-
UNSPECIFIED
public static final AuthLevel UNSPECIFIED
Unspecified; AuthLevel is system default if there is any.
-
-
Method Detail
-
values
public static AuthLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AuthLevel c : AuthLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AuthLevel valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-