Skip to content

Commit 22743d9

Browse files
authored
fix(jans-auth-server): when obtain new token using refresh token, check whether scope is null (#3382)
1 parent 3028a94 commit 22743d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jans-auth-server/server/src/main/java/io/jans/as/server/token/ws/rs/TokenExchangeService.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public class TokenExchangeService {
6666
private AttributeService attributeService;
6767

6868
public void rotateDeviceSecretOnRefreshToken(HttpServletRequest httpRequest, AuthorizationGrant refreshGrant, String scope) {
69-
if (!scope.contains(ScopeConstants.DEVICE_SSO)) {
69+
if (StringUtils.isBlank(scope) || !scope.contains(ScopeConstants.DEVICE_SSO)) {
70+
log.debug("Skip rotate device secret on refresh token. No device_sso scope.");
7071
return;
7172
}
7273
if (StringUtils.isBlank(refreshGrant.getSessionDn())) {

0 commit comments

Comments
 (0)