public abstract class TokenRequest extends AbstractRequest
getGrantType()
.
Example access token request:
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW grant_type=authorization_code &code=SplxlOBeZQQYbYS6WxSbIA &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
Related specifications:
Modifier | Constructor and Description |
---|---|
protected |
TokenRequest(URL uri,
GrantType grantType,
ClientAuthentication clientAuth)
Creates a new token request.
|
Modifier and Type | Method and Description |
---|---|
ClientAuthentication |
getClientAuthentication()
Gets the client authentication.
|
GrantType |
getGrantType()
Gets the grant type.
|
static TokenRequest |
parse(HTTPRequest httpRequest)
Parses the specified HTTP request for a token request.
|
getURI
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toHTTPRequest
protected TokenRequest(URL uri, GrantType grantType, ClientAuthentication clientAuth)
uri
- The URI of the token endpoint. May be
null
if the Request.toHTTPRequest()
method will not be used.grantType
- The grant type. Must not be null
.clientAuth
- The client authentication, null
if none.public GrantType getGrantType()
public ClientAuthentication getClientAuthentication()
null
if none.public static TokenRequest parse(HTTPRequest httpRequest) throws ParseException
httpRequest
- The HTTP request. Must not be null
.ParseException
- If the HTTP request couldn't be parsed to a
token request.Copyright © 2013 NimbusDS. All Rights Reserved.