don't treat openid scope special here -- by default client gets access to *all* scopes it's registered for

pull/306/merge
Justin Richer 12 years ago
parent 078342715b
commit f9d50db1f1

@ -119,12 +119,7 @@ public class ConnectAuthorizationRequestManager implements AuthorizationRequestM
Set<String> scopes = OAuth2Utils.parseParameterList(parameters.get("scope")); Set<String> scopes = OAuth2Utils.parseParameterList(parameters.get("scope"));
if ((scopes == null || scopes.isEmpty())) { if ((scopes == null || scopes.isEmpty())) {
//TODO: do we want to allow default scoping at all? //TODO: do we want to allow default scoping at all?
// If no scopes are specified in the incoming data, it is possible to default to the client's
//registered scopes, but minus the "openid" scope. OpenID Connect requests MUST have the "openid" scope.
Set<String> clientScopes = client.getScope(); Set<String> clientScopes = client.getScope();
if (clientScopes.contains("openid")) {
clientScopes.remove("openid");
}
scopes = clientScopes; scopes = clientScopes;
} }
DefaultAuthorizationRequest request = new DefaultAuthorizationRequest(inputParams, Collections.<String, String> emptyMap(), clientId, scopes); DefaultAuthorizationRequest request = new DefaultAuthorizationRequest(inputParams, Collections.<String, String> emptyMap(), clientId, scopes);

Loading…
Cancel
Save