public class TokenRequest extends Object implements Serializable
/auth/token API.
parameters(REQUIRED)OAuth 2.0 token request parameters which are the request parameters that the OAuth 2.0 token endpoint of the service implementation received from the client application.
The value of
"parameters"is the entire entity body (which is formatted inapplication/x-www-form-urlencoded) of the request from the client application.clientId(OPTIONAL)The client ID extracted from
Authorizationheader of the token request from the client application.If the token endpoint of the service implementation supports Basic Authentication as a means of client authentication, and the request from the client application contained its client ID in
Authorizationheader, the value should be extracted and set to this parameter.clientSecret(OPTIONAL)The client secret extracted from
Authorizationheader of the token request from the client application.If the token endpoint of the service implementation supports Basic Authentication as a means of client authentication, and the request from the client application contained its client secret in
Authorizationheader, the value should be extracted and set to this parameter.
An entity body of a token request may contain the client ID
(client_id) and the client secret (client_secret)
along with other request parameters as described in
RFC 6749, 2.3.1. Client Password. If the client credentials
are contained in both Authorization header and the entity
body, they must be identical. Otherwise, Authlete's /auth/token API generates an error (it's not a service error but
a client error).
| Constructor and Description |
|---|
TokenRequest() |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientId()
Get the client ID extracted from
Authorization
header of the token request from the client application. |
String |
getClientSecret()
Get the client secret extracted from
Authorization
header of the token request from the client application. |
String |
getParameters()
Get the value of
"parameters" which are the request
parameters that the OAuth 2.0 token endpoint of the service
implementation received from the client application. |
TokenRequest |
setClientId(String clientId)
Set the client ID extracted from
Authorization
header of the token request from the client application. |
TokenRequest |
setClientSecret(String clientSecret)
Set the client secret extracted from
Authorization
header of the token request from the client application. |
TokenRequest |
setParameters(String parameters)
Set the value of
"parameters" which are the request
parameters that the OAuth 2.0 token endpoint of the service
implementation received from the client application. |
public String getParameters()
"parameters" which are the request
parameters that the OAuth 2.0 token endpoint of the service
implementation received from the client application.public TokenRequest setParameters(String parameters)
"parameters" which are the request
parameters that the OAuth 2.0 token endpoint of the service
implementation received from the client application.public String getClientId()
Authorization
header of the token request from the client application.public TokenRequest setClientId(String clientId)
Authorization
header of the token request from the client application.public String getClientSecret()
Authorization
header of the token request from the client application.public TokenRequest setClientSecret(String clientSecret)
Authorization
header of the token request from the client application.Copyright © 2015. All rights reserved.