Browse Source

made scope handling consistent for introspection services (now a space-separated string), closes #570

pull/576/merge
Justin Richer 11 years ago
parent
commit
79bd7e420c
  1. 4
      openid-connect-client/src/main/java/org/mitre/oauth2/introspectingfilter/IntrospectingTokenService.java

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

@ -116,8 +116,8 @@ public class IntrospectingTokenService implements ResourceServerTokenServices {
private OAuth2Request createStoredRequest(final JsonObject token) { private OAuth2Request createStoredRequest(final JsonObject token) {
String clientId = token.get("client_id").getAsString(); String clientId = token.get("client_id").getAsString();
Set<String> scopes = new HashSet<String>(); Set<String> scopes = new HashSet<String>();
for (JsonElement e : token.get("scope").getAsJsonArray()) { if (token.has("scope")) {
scopes.add(e.getAsString()); scopes.addAll(OAuth2Utils.parseParameterList(token.get("scope").getAsString()));
} }
Map<String, String> parameters = new HashMap<String, String>(); Map<String, String> parameters = new HashMap<String, String>();
parameters.put("client_id", clientId); parameters.put("client_id", clientId);

Loading…
Cancel
Save