fixed oauth scope check

pull/708/merge
Justin Richer 2015-02-24 18:01:03 -05:00
parent 4d88e04e59
commit 40fc70894e
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ public class ResourceSetRegistrationEndpoint {
if (auth instanceof OAuth2Authentication) {
OAuth2Authentication oAuth2Authentication = (OAuth2Authentication) auth;
if (oAuth2Authentication.getOAuth2Request().getScope() == null
|| oAuth2Authentication.getOAuth2Request().getScope().contains(SystemScopeService.RESOURCE_SET_REGISTRATION_SCOPE)) {
|| !oAuth2Authentication.getOAuth2Request().getScope().contains(SystemScopeService.RESOURCE_SET_REGISTRATION_SCOPE)) {
throw new InsufficientScopeException("Insufficient scope", ImmutableSet.of(SystemScopeService.RESOURCE_SET_REGISTRATION_SCOPE));
}
}