public abstract class AccessTokenRequest extends Object implements OlpHttpMessage
| Modifier and Type | Field and Description |
|---|---|
protected static String |
EXPIRES_IN_FORM
expires_in; the parameter name for "expires in" when conveyed in a form body.
|
protected static String |
GRANT_TYPE_FORM |
protected static String |
GRANT_TYPE_JSON
Deprecated.
use
JacksonSerializer instead |
protected static String |
SCOPE_FORM |
protected static String |
SCOPE_JSON
Deprecated.
use
JacksonSerializer instead |
X_CORRELATION_ID| Modifier | Constructor and Description |
|---|---|
protected |
AccessTokenRequest(String grantType) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addFormParam(Map<String,List<String>> formParams,
String name,
Object value)
Adds the specified name and value to the form parameters.
|
Map<String,String> |
getAdditionalHeaders()
Get any additional headers that will be added to the token request.
|
String |
getCorrelationId()
Get the correlationId (the unique value for tracking a request across services and within a service).
|
Long |
getExpiresIn()
Gets the expiresIn value, the desired lifetime in seconds of the access token
returned by this request.
|
String |
getGrantType() |
String |
getScope()
Get the scope for the token request.
|
AccessTokenRequest |
setAdditionalHeaders(Map<String,String> additionalHeaders) |
AccessTokenRequest |
setCorrelationId(String correlationId)
Set the correlationId (the unique value for tracking a request across services and within a service).
|
AccessTokenRequest |
setExpiresIn(Long expiresIn)
Optionally set the lifetime in seconds of the access token returned by
this request.
|
AccessTokenRequest |
setScope(String scope)
Set the scope for the token request.
|
Map<String,List<String>> |
toFormParams()
Converts this request, to its formParams Map representation.
|
String |
toJson()
Deprecated.
use
JacksonSerializer instead |
protected static final String EXPIRES_IN_FORM
protected static final String GRANT_TYPE_JSON
JacksonSerializer insteadprotected static final String GRANT_TYPE_FORM
protected static final String SCOPE_JSON
JacksonSerializer insteadprotected static final String SCOPE_FORM
protected AccessTokenRequest(String grantType)
public String getGrantType()
public AccessTokenRequest setExpiresIn(Long expiresIn)
While the OAuth2.0 RFC doesn't list this as a request parameter, we add this so the client can request Access Token expirations within the allowable range. See also the response parameter expires_in.
This property is a HERE extension to RFC6749 providing additional data.
expiresIn - desired lifetime in seconds of the access tokenAccessTokenResponse.getExpiresIn(),
getExpiresIn()public Long getExpiresIn()
This property is a HERE extension to RFC6749 providing additional data.
public String getScope()
The example values are "openid sdp:GROUP-6bb1bfd9-8bdc-46c2-85cd-754068aa9497, GROUP-84ba52de-f80b-4047-a024-33d81e6153df" openid : Specifies the idToken is expected in the response sdp:[List of groupId separated by ','] or hrn:here:authorization::rlm0000:project/my-project-0000 A projectHRN for a Project-scoped token
public AccessTokenRequest setScope(String scope)
The example values are "openid sdp:GROUP-6bb1bfd9-8bdc-46c2-85cd-754068aa9497, GROUP-84ba52de-f80b-4047-a024-33d81e6153df". or hrn:here:authorization::rlm0000:project/my-project-0000 A projectHRN for a Project-scoped token
scope - the scope to setpublic Map<String,String> getAdditionalHeaders()
public AccessTokenRequest setAdditionalHeaders(Map<String,String> additionalHeaders)
public String getCorrelationId()
getCorrelationId in interface OlpHttpMessagepublic AccessTokenRequest setCorrelationId(String correlationId)
setCorrelationId in interface OlpHttpMessagecorrelationId - the correlationId@Deprecated public String toJson()
JacksonSerializer insteadpublic Map<String,List<String>> toFormParams()
protected static final void addFormParam(Map<String,List<String>> formParams, String name, Object value)
formParams - the formParams Map, for use with application/x-www-form-urlencoded bodiesname - the name of the form parametervalue - the value of the form parameterCopyright © 2021 HERE Europe B.V. All Rights Reserved.