
public class TokenCacheEntry extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
private String |
accessToken |
private Collection<String> |
audiences
Audiences.
|
private Date |
createdOn
Created on.
|
private Date |
expiresOn
Expires on.
|
private String |
jwt |
private String |
refreshToken |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
TokenCacheEntry(String accessToken,
String refreshToken,
String jwt,
Collection<String> audiences) |
TokenCacheEntry(String accessToken,
String refreshToken,
String jwt,
Collection<String> audiences,
Instant expiresOn) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken() |
Collection<String> |
getAudiences() |
Instant |
getCreatedOn() |
Integer |
getExpiresInSeconds()
If
getExpiresOn() is null, then this will return null. |
Instant |
getExpiresOn() |
String |
getJwt() |
String |
getRefreshToken() |
boolean |
isExpired()
If
getExpiresOn() is null, then this will return false. |
private static final long serialVersionUID
private final String accessToken
private final Collection<String> audiences
private final Date createdOn
Date is used because of
https://sonarcloud.io/organizations/default/rules#rule_key=squid%3AS3437private final Date expiresOn
Date is used because of
https://sonarcloud.io/organizations/default/rules#rule_key=squid%3AS3437private final String jwt
private final String refreshToken
public TokenCacheEntry(String accessToken, String refreshToken, String jwt, Collection<String> audiences)
public String getAccessToken()
public Collection<String> getAudiences()
public Instant getCreatedOn()
public Integer getExpiresInSeconds()
getExpiresOn() is null, then this will return null. Otherwise it
will return the number of seconds before expiration.public Instant getExpiresOn()
public String getJwt()
public String getRefreshToken()
public boolean isExpired()
getExpiresOn() is null, then this will return false.Copyright © 2012–2017 Trajano. All rights reserved.