org.springframework.social.oauth2
Enum OAuth2Version
java.lang.Object
java.lang.Enum<OAuth2Version>
org.springframework.social.oauth2.OAuth2Version
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<OAuth2Version>
public enum OAuth2Version
- extends java.lang.Enum<OAuth2Version>
Enum encapsulating the differences between the various versions of the OAuth2 specification.
- Author:
- Keith Donald, Craig Walls
Method Summary |
abstract java.lang.String |
getAuthorizationHeaderValue(java.lang.String accessToken)
|
static OAuth2Version |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static OAuth2Version[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
BEARER
public static final OAuth2Version BEARER
BEARER_DRAFT_2
public static final OAuth2Version BEARER_DRAFT_2
DRAFT_10
public static final OAuth2Version DRAFT_10
DRAFT_8
public static final OAuth2Version DRAFT_8
values
public static OAuth2Version[] 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 (OAuth2Version c : OAuth2Version.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static OAuth2Version 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 name
java.lang.NullPointerException
- if the argument is null
getAuthorizationHeaderValue
public abstract java.lang.String getAuthorizationHeaderValue(java.lang.String accessToken)