don't give resource sets default client scopes

pull/708/merge
Justin Richer 2015-03-30 09:56:35 -04:00
parent 7af19dbd61
commit 394785b9c4
1 changed files with 1 additions and 6 deletions

View File

@ -317,14 +317,9 @@ public class ResourceSetRegistrationEndpoint {
// scopes that the client is asking for
Set<SystemScope> requestedScopes = scopeService.fromStrings(rs.getScopes());
// the scopes that the client can have must be a subset of the dynamically allowed scopes
// the scopes that the resource set can have must be a subset of the dynamically allowed scopes
Set<SystemScope> allowedScopes = scopeService.removeRestrictedAndReservedScopes(requestedScopes);
// if the client didn't ask for any, give them the defaults
if (allowedScopes == null || allowedScopes.isEmpty()) {
allowedScopes = scopeService.getDefaults();
}
rs.setScopes(scopeService.toStrings(allowedScopes));
return rs;