use of org.apereo.cas.services.ReturnAllAttributeReleasePolicy in project cas by apereo.
the class RedisServiceRegistryTests method execSaveMethodWithDefaultUsernameAttribute.
@Test
public void execSaveMethodWithDefaultUsernameAttribute() {
final RegexRegisteredService r = new RegexRegisteredService();
r.setName("execSaveMethodWithDefaultUsernameAttribute");
r.setServiceId("testing");
r.setDescription("New service");
r.setUsernameAttributeProvider(new DefaultRegisteredServiceUsernameProvider());
final ReturnAllAttributeReleasePolicy policy = new ReturnAllAttributeReleasePolicy();
policy.setConsentPolicy(new DefaultRegisteredServiceConsentPolicy(CollectionUtils.wrapSet("test"), CollectionUtils.wrapSet("test")));
r.setAttributeReleasePolicy(policy);
final RegisteredService r2 = this.dao.save(r);
assertEquals(r2, r);
}
use of org.apereo.cas.services.ReturnAllAttributeReleasePolicy in project cas by apereo.
the class AbstractOAuth20Tests method getRegisteredService.
protected static OAuthRegisteredService getRegisteredService(final String serviceId, final String secret) {
final OAuthRegisteredService registeredServiceImpl = new OAuthRegisteredService();
registeredServiceImpl.setName("The registered service name");
registeredServiceImpl.setServiceId(serviceId);
registeredServiceImpl.setClientId(CLIENT_ID);
registeredServiceImpl.setClientSecret(secret);
registeredServiceImpl.setAttributeReleasePolicy(new ReturnAllAttributeReleasePolicy());
return registeredServiceImpl;
}
Aggregations