Skip to content

Commit 9d6f42b

Browse files
authored
Merge pull request mitreid-connect#1320 from bverhoeven/rfc7662-sub
Client: Parse 'sub' key to identify resource owner in introspection response (RFC7662)
2 parents dd922b4 + 85246d2 commit 9d6f42b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/IntrospectingTokenService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ private OAuth2Request createStoredRequest(final JsonObject token) {
244244
private Authentication createUserAuthentication(JsonObject token) {
245245
JsonElement userId = token.get("user_id");
246246
if(userId == null) {
247-
return null;
247+
userId = token.get("sub");
248+
if (userId == null) {
249+
return null;
250+
}
248251
}
249252

250253
return new PreAuthenticatedAuthenticationToken(userId.getAsString(), token, introspectionAuthorityGranter.getAuthorities(token));

0 commit comments

Comments
 (0)