Package com.authlete.common.types
Enum TokenType
- java.lang.Object
-
- java.lang.Enum<TokenType>
-
- com.authlete.common.types.TokenType
-
- All Implemented Interfaces:
Serializable,Comparable<TokenType>
public enum TokenType extends Enum<TokenType>
Token types registered at OAuth URI of OAuth Parameters of IANA (Internet Assigned Numbers Authority).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCESS_TOKENToken type URI for an OAuth 2.0 access token;"urn:ietf:params:oauth:token-type:access_token".DEVICE_SECRETToken type URI for a device secret;"urn:openid:params:token-type:device-secret".ID_TOKENToken type URI for an ID Token;"urn:ietf:params:oauth:token-type:id_token".JWTJSON Web Token (JWT) Token Type;"urn:ietf:params:oauth:token-type:jwt".REFRESH_TOKENToken type URI for an OAuth 2.0 refresh token;"urn:ietf:params:oauth:token-type:refresh_token".SAML1Token type URI for a base64url-encoded SAML 1.1 assertion;"urn:ietf:params:oauth:token-type:saml1".SAML2Token type URI for a base64url-encoded SAML 2.0 assertion;"urn:ietf:params:oauth:token-type:saml2".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenTypegetByValue(short value)Find an instance of this enum by a value.shortgetValue()Get the integer representation of this enum instance.static TokenTypeparse(String tokenType)ConvertStringtoTokenType.static TokenType[]toArray(int bits)static inttoBits(EnumSet<TokenType> set)static EnumSet<TokenType>toSet(int bits)static EnumSet<TokenType>toSet(TokenType[] array)StringtoString()static TokenTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TokenType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JWT
public static final TokenType JWT
JSON Web Token (JWT) Token Type;"urn:ietf:params:oauth:token-type:jwt".
-
ACCESS_TOKEN
public static final TokenType ACCESS_TOKEN
Token type URI for an OAuth 2.0 access token;"urn:ietf:params:oauth:token-type:access_token".
-
REFRESH_TOKEN
public static final TokenType REFRESH_TOKEN
Token type URI for an OAuth 2.0 refresh token;"urn:ietf:params:oauth:token-type:refresh_token".
-
ID_TOKEN
public static final TokenType ID_TOKEN
Token type URI for an ID Token;"urn:ietf:params:oauth:token-type:id_token".
-
SAML1
public static final TokenType SAML1
Token type URI for a base64url-encoded SAML 1.1 assertion;"urn:ietf:params:oauth:token-type:saml1".
-
SAML2
public static final TokenType SAML2
Token type URI for a base64url-encoded SAML 2.0 assertion;"urn:ietf:params:oauth:token-type:saml2".
-
DEVICE_SECRET
public static final TokenType DEVICE_SECRET
Token type URI for a device secret;"urn:openid:params:token-type:device-secret".- Since:
- 4.18, Authlete 3.0
- See Also:
- OpenID Connect Native SSO for Mobile Apps 1.0
-
-
Method Detail
-
values
public static TokenType[] 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 (TokenType c : TokenType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenType 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.
-
getByValue
public static TokenType 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
nullif not found.
-
parse
public static TokenType parse(String tokenType)
ConvertStringtoTokenType.- Parameters:
tokenType- A token type. For example,"urn:ietf:params:oauth:token-type:access_token".- Returns:
TokenTypeinstance, ornull.
-
toArray
public static TokenType[] toArray(int bits)
-
-