@Immutable public final class RefreshTokenRequest extends TokenRequest
access token
. This class
is immutable.
Note that the optional scope parameter is not supported.
Example refresh token request:
POST /token HTTP/1.1 Host: server.example.com Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW Content-Type: application/x-www-form-urlencoded;charset=UTF-8 grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
Related specifications:
Constructor and Description |
---|
RefreshTokenRequest(URL uri,
RefreshToken refreshToken)
Creates a new unauthenticated refresh token request.
|
RefreshTokenRequest(URL uri,
RefreshToken refreshToken,
ClientAuthentication clientAuth)
Creates a new authenticated refresh token request.
|
Modifier and Type | Method and Description |
---|---|
RefreshToken |
getRefreshToken()
Gets the refresh token.
|
static RefreshTokenRequest |
parse(HTTPRequest httpRequest)
Parses the specified HTTP request for a refresh token request.
|
HTTPRequest |
toHTTPRequest()
Returns the matching HTTP request.
|
getClientAuthentication, getGrantType
getURI
public RefreshTokenRequest(URL uri, RefreshToken refreshToken)
uri
- The URI of the token endpoint. May be
null
if the toHTTPRequest()
method will not be used.refreshToken
- The refresh token. Must not be null
.public RefreshTokenRequest(URL uri, RefreshToken refreshToken, ClientAuthentication clientAuth)
uri
- The URI of the token endpoint. May be
null
if the toHTTPRequest()
method will not be used.refreshToken
- The refresh token. Must not be null
.clientAuth
- The client authentication, null
if none.public RefreshToken getRefreshToken()
public HTTPRequest toHTTPRequest() throws SerializeException
Request
SerializeException
- If the request message couldn't be
serialised to an HTTP request.public static RefreshTokenRequest parse(HTTPRequest httpRequest) throws ParseException
httpRequest
- The HTTP request. Must not be null
.ParseException
- If the HTTP request couldn't be parsed to a
refresh token request.Copyright © 2013 NimbusDS. All Rights Reserved.