public class AccessTokenResponse extends Object implements RefreshableResponseProvider.ExpiringResponse, OlpHttpMessage
X_CORRELATION_ID| Constructor and Description |
|---|
AccessTokenResponse() |
AccessTokenResponse(String accessToken,
String tokenType,
Long expiresIn,
String refreshToken,
String idToken)
Deprecated.
|
AccessTokenResponse(String accessToken,
String tokenType,
Long expiresIn,
String refreshToken,
String idToken,
String scope) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
HERE Access Token.
|
String |
getCorrelationId()
Get the correlationId (the unique value for tracking a request across services and within a service).
|
Long |
getExpiresIn()
Seconds until expiration, at time of receipt of this object.
|
String |
getIdToken() |
String |
getRefreshToken()
If non-null, the refreshToken allows you to re-authorize and get a
new fresh accessToken.
|
String |
getScope()
Scope the token has access to.
|
Long |
getStartTimeMilliseconds()
Current time milliseconds UTC at the time of construction of this object.
|
String |
getTokenType()
The returned type of the token.
|
AccessTokenResponse |
setCorrelationId(String correlationId)
Set the correlationId (the unique value for tracking a request across services and within a service).
|
public AccessTokenResponse()
@Deprecated public AccessTokenResponse(String accessToken, String tokenType, Long expiresIn, String refreshToken, String idToken)
public String getAccessToken()
From OAuth2.0 access_token REQUIRED. The access token issued by the authorization server.
public String getTokenType()
From OAuth2.0 token_type REQUIRED. The type of the token issued as described in Section 7.1. Value is case insensitive.
public Long getExpiresIn()
From OAuth2.0 expires_in RECOMMENDED. The lifetime in seconds of the access token. For example, the value "3600" denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value.
getExpiresIn in interface RefreshableResponseProvider.ExpiringResponsepublic String getRefreshToken()
From OAuth2.0 refresh_token OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in Section 6.
public Long getStartTimeMilliseconds()
getStartTimeMilliseconds in interface RefreshableResponseProvider.ExpiringResponsepublic String getIdToken()
public String getCorrelationId()
getCorrelationId in interface OlpHttpMessagepublic AccessTokenResponse setCorrelationId(String correlationId)
setCorrelationId in interface OlpHttpMessagecorrelationId - the correlationIdpublic String getScope()
Copyright © 2022 HERE Europe B.V. All Rights Reserved.