|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.oauth2.sdk.TokenRequest
public abstract class TokenRequest
The base abstract class for access token and refresh token requests to the
Token endpoint. The request type can be inferred by calling
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:
Constructor Summary | |
---|---|
protected |
TokenRequest(GrantType grantType,
ClientAuthentication clientAuth)
Creates a new token request. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.nimbusds.oauth2.sdk.Request |
---|
toHTTPRequest |
Constructor Detail |
---|
protected TokenRequest(GrantType grantType, ClientAuthentication clientAuth)
grantType
- The grant type. Must not be null
.clientAuth
- The client authentication, null
if none.Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |