- All Implemented Interfaces:
Serializable
,Comparable<TokenType>
,java.lang.constant.Constable
The Enum TokenType.
-
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 TokenType
Returns thatTokenType
represented by the given name.getName()
Gets the name.static TokenType
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 Details
-
BEARER
Any party in possession of a bearer token (a "bearer") can use it to get access to the associated resources (without demonstrating possession of a cryptographic key). To prevent misuse, bearer tokens need to be protected from disclosure in storage and in transport. Provide thisTokenType
in an HTTP-HeaderHeaderField.TOKEN_TYPE
in case you want to use theBEARER
token type. See also "https://tools.ietf.org/html/rfc6750" -
MAC
Use MAC Tokens in HTTP requests to access OAuth 2.0 protected resources. An OAuth client willing to access a protected resource needs to demonstrate possession of a cryptographic key by using it with a keyed message digest function to the request. See also "https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-05" Provide thisTokenType
in an HTTP-HeaderHeaderField.TOKEN_TYPE
in case you want to use theMAC
token type.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getName
Gets the name.- Returns:
- the name
-
fromName
Returns thatTokenType
represented by the given name.
-