use of org.apereo.cas.uma.ticket.resource.ResourceSetPolicyPermission in project cas by apereo.
the class BaseUmaEndpointControllerTests method createUmaPolicyRegistrationRequest.
protected static ResourceSetPolicy createUmaPolicyRegistrationRequest(final UserProfile profile, final Collection<String> scopes) {
val policy = new ResourceSetPolicy();
val perm = new ResourceSetPolicyPermission();
perm.setScopes(new HashSet<>(scopes));
perm.setClaims(new LinkedHashMap<>(CollectionUtils.wrap("givenName", "CAS")));
perm.setSubject(profile.getId());
policy.setPermissions(CollectionUtils.wrapHashSet(perm));
return policy;
}
Aggregations