changed name of scope to match uma spec
parent
351ce3995a
commit
0d96b6a28a
|
@ -36,7 +36,7 @@ public interface SystemScopeService {
|
||||||
public static final String ID_TOKEN_SCOPE = "id-token"; // ID tokens are generated using this scope
|
public static final String ID_TOKEN_SCOPE = "id-token"; // ID tokens are generated using this scope
|
||||||
public static final String REGISTRATION_TOKEN_SCOPE = "registration-token"; // this scope manages dynamic client registrations
|
public static final String REGISTRATION_TOKEN_SCOPE = "registration-token"; // this scope manages dynamic client registrations
|
||||||
public static final String RESOURCE_TOKEN_SCOPE = "resource-token"; // this scope manages client-style protected resources
|
public static final String RESOURCE_TOKEN_SCOPE = "resource-token"; // this scope manages client-style protected resources
|
||||||
public static final String RESOURCE_SET_REGISTRATION_SCOPE = "resource_set_registration";
|
public static final String UMA_PROTECTION_SCOPE = "uma_protection";
|
||||||
|
|
||||||
public static final Set<SystemScope> reservedScopes =
|
public static final Set<SystemScope> reservedScopes =
|
||||||
Sets.newHashSet(
|
Sets.newHashSet(
|
||||||
|
|
|
@ -229,8 +229,8 @@ public class ResourceSetRegistrationEndpoint {
|
||||||
if (auth instanceof OAuth2Authentication) {
|
if (auth instanceof OAuth2Authentication) {
|
||||||
OAuth2Authentication oAuth2Authentication = (OAuth2Authentication) auth;
|
OAuth2Authentication oAuth2Authentication = (OAuth2Authentication) auth;
|
||||||
if (oAuth2Authentication.getOAuth2Request().getScope() == null
|
if (oAuth2Authentication.getOAuth2Request().getScope() == null
|
||||||
|| !oAuth2Authentication.getOAuth2Request().getScope().contains(SystemScopeService.RESOURCE_SET_REGISTRATION_SCOPE)) {
|
|| !oAuth2Authentication.getOAuth2Request().getScope().contains(SystemScopeService.UMA_PROTECTION_SCOPE)) {
|
||||||
throw new InsufficientScopeException("Insufficient scope", ImmutableSet.of(SystemScopeService.RESOURCE_SET_REGISTRATION_SCOPE));
|
throw new InsufficientScopeException("Insufficient scope", ImmutableSet.of(SystemScopeService.UMA_PROTECTION_SCOPE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue