org.springframework.social.oauth2
Enum GrantType

java.lang.Object
  extended by java.lang.Enum<GrantType>
      extended by org.springframework.social.oauth2.GrantType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GrantType>

public enum GrantType
extends java.lang.Enum<GrantType>

OAuth2 supports two types of authorization flow, typically referred to as "Client-side" and "Server-side".


Enum Constant Summary
AUTHORIZATION_CODE
          AUTHORIZATION_CODE denotes the server-side authorization flow, and is associated with the response_type=code parameter value
IMPLICIT_GRANT
          IMPLICIT_GRANT denotes the client-side authorization flow and is associated with the response_type=token parameter value
 
Method Summary
static GrantType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GrantType[] 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
 

Enum Constant Detail

AUTHORIZATION_CODE

public static final GrantType AUTHORIZATION_CODE
AUTHORIZATION_CODE denotes the server-side authorization flow, and is associated with the response_type=code parameter value


IMPLICIT_GRANT

public static final GrantType IMPLICIT_GRANT
IMPLICIT_GRANT denotes the client-side authorization flow and is associated with the response_type=token parameter value

Method Detail

values

public static GrantType[] 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 (GrantType c : GrantType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GrantType 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