mirror of
https://gitee.com/fujieid/jap.git
synced 2024-11-30 10:37:35 +08:00
🐛 fix: fix the Gitee Issue [#I3XHTK]
This commit is contained in:
parent
6d4428bfc1
commit
a461d0c77c
@ -136,10 +136,10 @@ public class TokenUtil {
|
||||
accessToken.setAccessTokenExpiration(OauthUtil.getAccessTokenExpiresAt(accessTokenExpiresIn));
|
||||
accessToken.setRefreshTokenExpiration(OauthUtil.getRefreshTokenExpiresAt(refreshTokenExpiresIn));
|
||||
|
||||
String token = IdsConsts.OAUTH_ACCESS_TOKEN_CACHE_KEY + accessTokenStr;
|
||||
String rtoken = IdsConsts.OAUTH_REFRESH_TOKEN_CACHE_KEY + refreshTokenStr;
|
||||
JapIds.getContext().getCache().set(token, accessToken, accessTokenExpiresIn * 1000);
|
||||
JapIds.getContext().getCache().set(rtoken, accessToken, refreshTokenExpiresIn * 1000);
|
||||
String tokenCacheKey = IdsConsts.OAUTH_ACCESS_TOKEN_CACHE_KEY + accessTokenStr;
|
||||
String rtokenCacheKey = IdsConsts.OAUTH_REFRESH_TOKEN_CACHE_KEY + refreshTokenStr;
|
||||
JapIds.getContext().getCache().set(tokenCacheKey, accessToken, accessTokenExpiresIn * 1000);
|
||||
JapIds.getContext().getCache().set(rtokenCacheKey, accessToken, refreshTokenExpiresIn * 1000);
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ public class TokenUtil {
|
||||
accessToken.setAccessTokenExpiration(OauthUtil.getAccessTokenExpiresAt(accessTokenExpiresIn));
|
||||
|
||||
String tokenCacheKey = IdsConsts.OAUTH_ACCESS_TOKEN_CACHE_KEY + accessTokenStr;
|
||||
JapIds.getContext().getCache().set(tokenCacheKey, accessTokenStr, accessTokenExpiresIn * 1000);
|
||||
JapIds.getContext().getCache().set(tokenCacheKey, accessToken, accessTokenExpiresIn * 1000);
|
||||
|
||||
String rawTokenCacheKey = IdsConsts.OAUTH_ACCESS_TOKEN_CACHE_KEY + rawToken;
|
||||
JapIds.getContext().getCache().removeKey(rawTokenCacheKey);
|
||||
|
Loading…
Reference in New Issue
Block a user