From 51d66fb5a242994806310cb6e95dbf5577eb884d Mon Sep 17 00:00:00 2001 From: smallbun <2689170096@qq.com> Date: Sun, 3 Sep 2023 11:05:07 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96OIDC=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E9=97=B4=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/RedisOAuth2AuthorizationService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eiam-protocol/eiam-protocol-oidc/src/main/java/cn/topiam/eiam/protocol/oidc/authentication/RedisOAuth2AuthorizationService.java b/eiam-protocol/eiam-protocol-oidc/src/main/java/cn/topiam/eiam/protocol/oidc/authentication/RedisOAuth2AuthorizationService.java index 8d6cbdb6..97deed13 100644 --- a/eiam-protocol/eiam-protocol-oidc/src/main/java/cn/topiam/eiam/protocol/oidc/authentication/RedisOAuth2AuthorizationService.java +++ b/eiam-protocol/eiam-protocol-oidc/src/main/java/cn/topiam/eiam/protocol/oidc/authentication/RedisOAuth2AuthorizationService.java @@ -123,7 +123,7 @@ public class RedisOAuth2AuthorizationService implements OAuth2AuthorizationServi // TODO 等 spring-authorization-server 授权服务器支持后更改 Duration idTokenTtl = Duration.of(30, ChronoUnit.MINUTES); Duration max = authorization.getRefreshToken() == null ? accessTokenTtl - : Collections.max(Arrays.asList(accessTokenTtl, refreshTokenTtl)); + : Collections.max(Arrays.asList(accessTokenTtl, refreshTokenTtl, idTokenTtl)); final String authorizationId = authorization.getId(); final String idToAuthorizationKey = getIdToAuthorizationKey(authorizationId); @@ -266,8 +266,8 @@ public class RedisOAuth2AuthorizationService implements OAuth2AuthorizationServi return prefix + REFRESH_TO_AUTHORIZATION + generateKey(refreshToken); } - private String getIdTokenToAuthorization(String refreshToken) { - return prefix + UID_TO_AUTHORIZATIONS + generateKey(refreshToken); + private String getIdTokenToAuthorization(String idToken) { + return prefix + UID_TO_AUTHORIZATIONS + generateKey(idToken); } private String getIdToCorrelations(String authorizationId) {