Package com.nimbusds.oauth2.sdk
Class ClientCredentialsGrant
java.lang.Object
com.nimbusds.oauth2.sdk.AuthorizationGrant
com.nimbusds.oauth2.sdk.ClientCredentialsGrant
Client credentials grant. Used in access token requests where the client is
acting on its own behalf.
Related specifications:
- OAuth 2.0 (RFC 6749), section 4.4.2.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.nimbusds.oauth2.sdk.AuthorizationGrant
getType
-
Field Details
-
GRANT_TYPE
The grant type.
-
-
Constructor Details
-
ClientCredentialsGrant
public ClientCredentialsGrant()Creates a new client credentials grant. The actual client credentials are included in theclient authentication
of theTokenRequest
.
-
-
Method Details
-
toParameters
Description copied from class:AuthorizationGrant
Returns the request body parameters for the authorisation grant.- Specified by:
toParameters
in classAuthorizationGrant
- Returns:
- The parameters.
-
parse
Parses a client credentials grant from the specified request body parameters.Example:
grant_type=client_credentials
- Parameters:
params
- The parameters.- Returns:
- The client credentials grant.
- Throws:
ParseException
- If parsing failed.
-