@Immutable public final class GrantType extends Identifier
Modifier and Type | Field and Description |
---|---|
static GrantType |
AUTHORIZATION_CODE
Authorisation code.
|
static GrantType |
CLIENT_CREDENTIALS
Client credentials.
|
static GrantType |
IMPLICIT
Implicit.
|
static GrantType |
JWT_BEARER
JWT bearer, as defined in draft-ietf-oauth-jwt-bearer-10.
|
static GrantType |
PASSWORD
Password.
|
static GrantType |
REFRESH_TOKEN
Refresh token.
|
static GrantType |
SAML2_BEARER
SAML 2.0 bearer, as defined in draft-ietf-oauth-saml2-bearer-21.
|
DEFAULT_BYTE_LENGTH
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Overrides
Object.equals() . |
static GrantType |
parse(String value)
Parses a grant type from the specified string.
|
boolean |
requiresClientAuthentication()
Gets the client authentication requirement.
|
boolean |
requiresClientID()
Gets the client identifier requirement.
|
compareTo, getValue, hashCode, toJSONString, toString
public static final GrantType AUTHORIZATION_CODE
public static final GrantType IMPLICIT
public static final GrantType REFRESH_TOKEN
public static final GrantType PASSWORD
public static final GrantType CLIENT_CREDENTIALS
public static final GrantType JWT_BEARER
public static final GrantType SAML2_BEARER
public boolean requiresClientAuthentication()
true
if explicit client authentication is always
required for this grant type, else false
.public boolean requiresClientID()
true
if a client identifier must always be
communicated for this grant type (either as part of the
client authentication, or as a parameter in the token
request body), else false
.public boolean equals(Object object)
Identifier
Object.equals()
.equals
in class Identifier
object
- The object to compare to.true
if the objects have the same value, otherwise
false
.public static GrantType parse(String value) throws ParseException
value
- The string to parse. Must not be null
.ParseException
- If string doesn't correspond to a valid or
supported grant.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.