Restlet Framework 2.2.3
Java Enterprise Edition

org.restlet.ext.oauth
Enum GrantType

java.lang.Object
  extended by java.lang.Enum<GrantType>
      extended by org.restlet.ext.oauth.GrantType
All Implemented Interfaces:
Serializable, Comparable<GrantType>

public enum GrantType
extends Enum<GrantType>

Supported mechanisms to grant tokens.

Author:
Kristoffer Gronowski

Enum Constant Summary
authorization_code
          Defined in 4.1 Authorization Code Grant.
client_credentials
          Defined in 4.4 Client Credentials Grant.
password
          Defined in 4.3 Resource Owner Password Credentials Grant.
refresh_token
          Defined in 6 Refreshing an Access Token.
 
Method Summary
static GrantType valueOf(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
Defined in 4.1 Authorization Code Grant.


password

public static final GrantType password
Defined in 4.3 Resource Owner Password Credentials Grant.


client_credentials

public static final GrantType client_credentials
Defined in 4.4 Client Credentials Grant.


refresh_token

public static final GrantType refresh_token
Defined in 6 Refreshing an Access Token.

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(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 name
NullPointerException - if the argument is null

Restlet Framework 2.2.3
Java Enterprise Edition

Copyright © 2005-2014 Restlet.