use of org.apereo.cas.support.saml.authentication.SamlResponseBuilder in project cas by apereo.
the class Saml10SuccessResponseViewTests method initialize.
@BeforeEach
public void initialize() {
val appCtx = new StaticApplicationContext();
appCtx.refresh();
val list = new ArrayList<RegisteredService>();
list.add(RegisteredServiceTestUtils.getRegisteredService("https://.+"));
val dao = new InMemoryServiceRegistry(appCtx, list, new ArrayList<>());
val context = ServicesManagerConfigurationContext.builder().serviceRegistry(dao).applicationContext(appCtx).environments(new HashSet<>(0)).servicesCache(Caffeine.newBuilder().build()).registeredServiceLocators(List.of(new DefaultServicesManagerRegisteredServiceLocator())).build();
val mgmr = new DefaultServicesManager(context);
mgmr.load();
val protocolAttributeEncoder = new DefaultCasProtocolAttributeEncoder(mgmr, CipherExecutor.noOpOfStringToString());
val builder = new Saml10ObjectBuilder(configBean);
val samlResponseBuilder = new SamlResponseBuilder(builder, "testIssuer", "whatever", 1000, "PT30S", new NoOpProtocolAttributeEncoder(), mgmr);
this.response = new Saml10SuccessResponseView(protocolAttributeEncoder, mgmr, new DefaultArgumentExtractor(new SamlServiceFactory()), StandardCharsets.UTF_8.name(), new DefaultAuthenticationAttributeReleasePolicy("attribute"), new DefaultAuthenticationServiceSelectionPlan(), NoOpProtocolAttributesRenderer.INSTANCE, samlResponseBuilder);
}
use of org.apereo.cas.support.saml.authentication.SamlResponseBuilder in project cas by apereo.
the class Saml10FailureResponseViewTests method initialize.
@BeforeEach
public void initialize() {
val builder = new Saml10ObjectBuilder(this.configBean);
val samlResponseBuilder = new SamlResponseBuilder(builder, null, null, 0, "PT30S", new NoOpProtocolAttributeEncoder(), null);
view = new Saml10FailureResponseView(new NoOpProtocolAttributeEncoder(), null, new DefaultArgumentExtractor(new SamlServiceFactory()), StandardCharsets.UTF_8.name(), null, new DefaultAuthenticationServiceSelectionPlan(), NoOpProtocolAttributesRenderer.INSTANCE, samlResponseBuilder);
}
Aggregations