Class AuthorizationGrantType
- java.lang.Object
-
- org.springframework.security.oauth2.core.AuthorizationGrantType
-
- All Implemented Interfaces:
java.io.Serializable
public final class AuthorizationGrantType extends java.lang.Object implements java.io.Serializable
An authorization grant is a credential representing the resource owner's authorization (to access it's protected resources) to the client and used by the client to obtain an access token.The OAuth 2.0 Authorization Framework defines four standard grant types: authorization code, implicit, resource owner password credentials, and client credentials. It also provides an extensibility mechanism for defining additional grant types.
- Since:
- 5.0
- See Also:
- Section 1.3 Authorization Grant, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AuthorizationGrantType
AUTHORIZATION_CODE
static AuthorizationGrantType
CLIENT_CREDENTIALS
static AuthorizationGrantType
IMPLICIT
Deprecated.static AuthorizationGrantType
JWT_BEARER
static AuthorizationGrantType
PASSWORD
static AuthorizationGrantType
REFRESH_TOKEN
-
Constructor Summary
Constructors Constructor Description AuthorizationGrantType(java.lang.String value)
Constructs anAuthorizationGrantType
using the provided value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getValue()
Returns the value of the authorization grant type.int
hashCode()
-
-
-
Field Detail
-
AUTHORIZATION_CODE
public static final AuthorizationGrantType AUTHORIZATION_CODE
-
IMPLICIT
@Deprecated public static final AuthorizationGrantType IMPLICIT
Deprecated.It is not recommended to use the implicit flow due to the inherent risks of returning access tokens in an HTTP redirect without any confirmation that it has been received by the client.- See Also:
- OAuth 2.0 Implicit Grant
-
REFRESH_TOKEN
public static final AuthorizationGrantType REFRESH_TOKEN
-
CLIENT_CREDENTIALS
public static final AuthorizationGrantType CLIENT_CREDENTIALS
-
PASSWORD
public static final AuthorizationGrantType PASSWORD
-
JWT_BEARER
public static final AuthorizationGrantType JWT_BEARER
- Since:
- 5.5
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Returns the value of the authorization grant type.- Returns:
- the value of the authorization grant type
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-