Search in sources :

Example 1 with SSOManagerBuilder

use of org.wildfly.clustering.web.undertow.sso.SSOManagerBuilder in project wildfly by wildfly.

the class DistributableSingleSignOnManagerBuilder method build.

@Override
public ServiceBuilder<SingleSignOnManager> build(ServiceTarget target, ServiceName name, CapabilityServiceSupport support, String securityDomainName, SessionIdGenerator generator) {
    ServiceName securityDomainServiceName = support.getCapabilityServiceName(ApplicationSecurityDomainDefinition.APPLICATION_SECURITY_DOMAIN_CAPABILITY, securityDomainName);
    Builder<SSOManagerFactory<ElytronAuthentication, String, Map.Entry<String, URI>, Batch>> factoryBuilder = PROVIDER.<ElytronAuthentication, String, Map.Entry<String, URI>>getBuilder(securityDomainName).configure(support);
    Builder<SessionIdGenerator> generatorBuilder = new SimpleBuilder<>(securityDomainServiceName.append("generator"), generator);
    Builder<SSOManager<ElytronAuthentication, String, Map.Entry<String, URI>, LocalSSOContext, Batch>> managerBuilder = new SSOManagerBuilder<>(factoryBuilder.getServiceName(), generatorBuilder.getServiceName(), new LocalSSOContextFactory());
    Arrays.asList(factoryBuilder, generatorBuilder, managerBuilder).forEach(builder -> builder.build(target).setInitialMode(ServiceController.Mode.ON_DEMAND).install());
    return target.addService(name, new ValueService<>(this)).addDependency(managerBuilder.getServiceName(), SSOManager.class, this.manager).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : SSOManager(org.wildfly.clustering.web.sso.SSOManager) SimpleBuilder(org.wildfly.clustering.service.SimpleBuilder) SSOManagerBuilder(org.wildfly.clustering.web.undertow.sso.SSOManagerBuilder) URI(java.net.URI) SSOManagerFactory(org.wildfly.clustering.web.sso.SSOManagerFactory) ServiceName(org.jboss.msc.service.ServiceName) SessionIdGenerator(io.undertow.server.session.SessionIdGenerator) Map(java.util.Map)

Aggregations

SessionIdGenerator (io.undertow.server.session.SessionIdGenerator)1 URI (java.net.URI)1 Map (java.util.Map)1 ServiceName (org.jboss.msc.service.ServiceName)1 SimpleBuilder (org.wildfly.clustering.service.SimpleBuilder)1 SSOManager (org.wildfly.clustering.web.sso.SSOManager)1 SSOManagerFactory (org.wildfly.clustering.web.sso.SSOManagerFactory)1 SSOManagerBuilder (org.wildfly.clustering.web.undertow.sso.SSOManagerBuilder)1