use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.
the class Saml10SuccessResponseViewTests method setUp.
@Before
public void setUp() throws Exception {
final List<RegisteredService> list = new ArrayList<>();
list.add(RegisteredServiceTestUtils.getRegisteredService("https://.+"));
final InMemoryServiceRegistry dao = new InMemoryServiceRegistry();
dao.setRegisteredServices(list);
final DefaultServicesManager mgmr = new DefaultServicesManager(dao);
mgmr.load();
this.response = new Saml10SuccessResponseView(new DefaultCasProtocolAttributeEncoder(mgmr, NoOpCipherExecutor.getInstance()), mgmr, "attribute", new Saml10ObjectBuilder(configBean), new DefaultArgumentExtractor(new SamlServiceFactory()), StandardCharsets.UTF_8.name(), 1000, "testIssuer", "whatever");
}
use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.
the class ServiceThemeResolverTests method setUp.
@Before
public void setUp() throws Exception {
this.servicesManager = new DefaultServicesManager(new InMemoryServiceRegistry());
mobileBrowsers = new HashMap<>();
mobileBrowsers.put(MOZILLA, "theme");
this.serviceThemeResolver = new ServiceThemeResolver(DEFAULT_THEME_NAME, servicesManager, mobileBrowsers);
}
use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.
the class RegisteredServiceSimpleFormControllerTests method setUp.
@Before
public void setUp() throws Exception {
final Map<String, List<Object>> attributes = new HashMap<>();
attributes.put(TEST_ID, Arrays.asList(new Object[] { TEST_ID }));
this.repository = new StubPersonAttributeDao();
this.repository.setBackingMap(attributes);
this.registeredServiceFactory = new DefaultRegisteredServiceFactory(new DefaultAccessStrategyMapper(), policyMapper, new DefaultProxyPolicyMapper(), new DefaultRegisteredServiceMapper(), new DefaultUsernameAttributeProviderMapper(), Collections.singletonList(new AttributeFormDataPopulator(this.repository)));
this.manager = new DefaultServicesManager(new InMemoryServiceRegistry());
this.controller = new RegisteredServiceSimpleFormController(this.manager, this.registeredServiceFactory);
}
use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.
the class ManageRegisteredServicesMultiActionControllerTests method setUp.
@Before
public void setUp() throws Exception {
this.servicesManager = new DefaultServicesManager(new InMemoryServiceRegistry());
this.registeredServiceFactory = new DefaultRegisteredServiceFactory(new DefaultAccessStrategyMapper(), policyMapper, new DefaultProxyPolicyMapper(), new DefaultRegisteredServiceMapper(), new DefaultUsernameAttributeProviderMapper(), Collections.emptyList());
this.controller = new ManageRegisteredServicesMultiActionController(this.servicesManager, this.registeredServiceFactory, new WebApplicationServiceFactory(), "https://cas.example.org");
}
use of org.apereo.cas.services.DefaultServicesManager in project cas by apereo.
the class SamlRegisteredServiceTests method checkPattern.
@Test
public void checkPattern() {
final SamlRegisteredService service = new SamlRegisteredService();
service.setName(SAML_SERVICE);
service.setServiceId("^http://.+");
service.setMetadataLocation(METADATA_LOCATION);
final InMemoryServiceRegistry dao = new InMemoryServiceRegistry();
dao.setRegisteredServices(Collections.singletonList(service));
final DefaultServicesManager impl = new DefaultServicesManager(dao);
impl.load();
final RegisteredService s = impl.findServiceBy(new WebApplicationServiceFactory().createService("http://mmoayyed.unicon.net:8081/sp/saml/SSO"));
assertNotNull(s);
}
Aggregations