Preserve scopes in JpaOAuth2AuthorizationService (how-to)

Closes gh-697
This commit is contained in:
Steve Riesenberg
2022-04-21 15:40:01 -05:00
parent b05bf74a82
commit 51de75bc01

View File

@@ -135,7 +135,8 @@ public class JpaOAuth2AuthorizationService implements OAuth2AuthorizationService
OAuth2AccessToken.TokenType.BEARER,
entity.getAccessTokenValue(),
entity.getAccessTokenIssuedAt(),
entity.getAccessTokenExpiresAt());
entity.getAccessTokenExpiresAt(),
StringUtils.commaDelimitedListToSet(entity.getAccessTokenScopes()));
builder.token(accessToken, metadata -> metadata.putAll(parseMap(entity.getAccessTokenMetadata())));
}