use of org.apereo.cas.support.saml.authentication.principal.SamlServiceFactory in project cas by apereo.
the class Saml10FailureResponseViewTests method setUp.
@Before
public void setUp() throws Exception {
final Saml10ObjectBuilder builder = new Saml10ObjectBuilder(this.configBean);
view = new Saml10FailureResponseView(null, null, "attribute", builder, new DefaultArgumentExtractor(new SamlServiceFactory()), StandardCharsets.UTF_8.name(), 0);
}
use of org.apereo.cas.support.saml.authentication.principal.SamlServiceFactory 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.support.saml.authentication.principal.SamlServiceFactory in project cas by apereo.
the class WebUtilTests method verifyFoundNoService.
@Test
public void verifyFoundNoService() {
final DefaultArgumentExtractor casArgumentExtractor = new DefaultArgumentExtractor(new SamlServiceFactory());
final MockHttpServletRequest request = new MockHttpServletRequest();
request.setParameter(CasProtocolConstants.PARAMETER_SERVICE, "test");
final Service service = WebUtils.getService(Collections.singletonList(casArgumentExtractor), request);
assertNull(service);
}
Aggregations