You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@hossbert The second code fragment, in the issue, is the sample you are looking for. basically, in addition to check against null values, we need to check the token expiration too:
public Access getAccessByTenant(String tenantName) {
Access access = hashTenantAccess.get(tenantName);
if (access == null || Calendar.getInstance().after(access.getToken().getExpires())) {
//code omitted. (request for new token)
}
return access;
}
Any chance of this getting merged into the main codebase?
On 31 May 2014 10:48, "Mohammad Shamsi" [email protected] wrote:
@hossberthttps://github.com/hossbert The second code fragment, in the
issue, is the sample you are looking for. basically, in addition to check
against null values, we need to check the token expiration too:
public Access getAccessByTenant(String tenantName) {
Access access = hashTenantAccess.get(tenantName);
if (access == null || Calendar.getInstance().after(access.getToken().getExpires())) {
//code omitted. (request for new token)
}
return access;
}
—
Reply to this email directly or view it on GitHub #129 (comment)
.
Each token has an expire date, so token provider must check if the current token is expired or not.
this code in KeystoneTokenProvider:
must be something like:
The text was updated successfully, but these errors were encountered: