Package com.authlete.common.types
Enum StandardScope
- java.lang.Object
-
- java.lang.Enum<StandardScope>
-
- com.authlete.common.types.StandardScope
-
- All Implemented Interfaces:
Serializable
,Comparable<StandardScope>
public enum StandardScope extends Enum<StandardScope>
Scopes defined by related specifications.- Since:
- 1.5
- Author:
- Takahiko Kawasaki
- See Also:
- OpenID Connect Core 1.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDRESS
"address"
, which requests"address"
claim.EMAIL
"email"
, which requests"email"
and"email_verified"
claims.OFFLINE_ACCESS
"offline_access"
, which requests that an OAuth 2.0 Refresh Token be issued that can be used to obtain an Access Token that grants access to the End-User's UserInfo Endpoint even when the End-User is not present (not logged in).OPENID
"openid"
, which must be contained in every OpenID Connect Authentication Request.PHONE
"phone"
, which requests"phone_number"
and"phone_number_verified"
claims.PROFILE
"profile"
, which requests the following claims:"name"
,"family_name"
,"given_name"
,"middle_name"
,"nickname"
,"preferred_username"
,"profile"
,"picture"
,"website"
,"gender"
,"birthdate"
,"zoneinfo"
,"locale"
and"updated_at"
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StandardScope
getByValue(short value)
Find an instance of this enum by a value.short
getValue()
Get the integer representation of this enum instance.static StandardScope
parse(String scope)
ConvertString
toStandardScope
.static StandardScope[]
toArray(int bits)
static int
toBits(EnumSet<StandardScope> set)
static EnumSet<StandardScope>
toSet(int bits)
static EnumSet<StandardScope>
toSet(StandardScope[] array)
String
toString()
static StandardScope
valueOf(String name)
Returns the enum constant of this type with the specified name.static StandardScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADDRESS
public static final StandardScope ADDRESS
"address"
, which requests"address"
claim.
-
EMAIL
public static final StandardScope EMAIL
"email"
, which requests"email"
and"email_verified"
claims.
-
OPENID
public static final StandardScope OPENID
"openid"
, which must be contained in every OpenID Connect Authentication Request.
-
OFFLINE_ACCESS
public static final StandardScope OFFLINE_ACCESS
"offline_access"
, which requests that an OAuth 2.0 Refresh Token be issued that can be used to obtain an Access Token that grants access to the End-User's UserInfo Endpoint even when the End-User is not present (not logged in).
-
PHONE
public static final StandardScope PHONE
"phone"
, which requests"phone_number"
and"phone_number_verified"
claims.
-
PROFILE
public static final StandardScope PROFILE
"profile"
, which requests the following claims:"name"
,"family_name"
,"given_name"
,"middle_name"
,"nickname"
,"preferred_username"
,"profile"
,"picture"
,"website"
,"gender"
,"birthdate"
,"zoneinfo"
,"locale"
and"updated_at"
.
-
-
Method Detail
-
values
public static StandardScope[] 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 (StandardScope c : StandardScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StandardScope valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public short getValue()
Get the integer representation of this enum instance.
-
toString
public String toString()
- Overrides:
toString
in classEnum<StandardScope>
-
getByValue
public static StandardScope getByValue(short value)
Find an instance of this enum by a value.- Parameters:
value
- The integer representation of the instance to find.- Returns:
- An instance of this enum, or
null
if not found.
-
parse
public static StandardScope parse(String scope)
ConvertString
toStandardScope
.- Parameters:
scope
- A standard scope name. For example,"openid"
.- Returns:
StandardScope
instance, ornull
.
-
toBits
public static int toBits(EnumSet<StandardScope> set)
-
toArray
public static StandardScope[] toArray(int bits)
-
toSet
public static EnumSet<StandardScope> toSet(int bits)
-
toSet
public static EnumSet<StandardScope> toSet(StandardScope[] array)
-
-