public class FileAccessTokenResponse extends AccessTokenResponse
getExp() gives you the proper expiration time,
and getExpiresIn() is dynamically computed to behave as though
you just got the response from a server.X_CORRELATION_ID| Constructor and Description |
|---|
FileAccessTokenResponse() |
FileAccessTokenResponse(String accessToken,
String tokenType,
Long expiresIn,
String refreshToken,
String idToken,
Long exp)
Deprecated.
|
FileAccessTokenResponse(String accessToken,
String tokenType,
Long expiresIn,
String refreshToken,
String idToken,
Long exp,
String scope)
Construct a FileAccessTokenResponse with the specified values.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
getExp()
exp
The "exp" (expiration time) claim identifies the expiration time on
or after which the JWT MUST NOT be accepted for processing.
|
Long |
getExpiresIn()
In a File-based Access Token Response, the access_token may have been written
long ago, and the appropriate expiresIn value is derived from the fixed quantity
"exp" seconds minus the time of this object creation in seconds.
|
getAccessToken, getCorrelationId, getIdToken, getRefreshToken, getScope, getStartTimeMilliseconds, getTokenType, setCorrelationIdpublic FileAccessTokenResponse()
@Deprecated public FileAccessTokenResponse(String accessToken, String tokenType, Long expiresIn, String refreshToken, String idToken, Long exp)
accessToken - the accessTokentokenType - the tokenType, for example "bearer"expiresIn - the expiresIn, in seconds to expirationrefreshToken - the refreshTokenidToken - the idTokenexp - the expiration time in UTC secondspublic FileAccessTokenResponse(String accessToken, String tokenType, Long expiresIn, String refreshToken, String idToken, Long exp, String scope)
accessToken - the accessTokentokenType - the tokenType, for example "bearer"expiresIn - the expiresIn, in seconds to expirationrefreshToken - the refreshTokenidToken - the idTokenexp - the expiration time in UTC secondsscope - the scope of the accessToken, if applicablepublic Long getExpiresIn()
Seconds until expiration, at time of receipt of this object.
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.ExpiringResponsegetExpiresIn in class AccessTokenResponsepublic Long getExp()
See also JSON Web Token (JWT): "exp" (Expiration Time) Claim.
It is of type "NumericDate": A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.
See also JSON Web Token (JWT): Terminology.
Copyright © 2021 HERE Europe B.V. All Rights Reserved.