Browse Source

Merge pull request #1320 from bverhoeven/rfc7662-sub

Client: Parse 'sub' key to identify resource owner in introspection response (RFC7662)
pull/1315/merge
Justin Richer 7 years ago committed by GitHub
parent
commit
9d6f42b141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/IntrospectingTokenService.java

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

@ -244,7 +244,10 @@ public class IntrospectingTokenService implements ResourceServerTokenServices {
private Authentication createUserAuthentication(JsonObject token) {
JsonElement userId = token.get("user_id");
if(userId == null) {
return null;
userId = token.get("sub");
if (userId == null) {
return null;
}
}
return new PreAuthenticatedAuthenticationToken(userId.getAsString(), token, introspectionAuthorityGranter.getAuthorities(token));

Loading…
Cancel
Save