use of org.wildfly.clustering.web.sso.DistributableSSOManagementProvider in project wildfly by wildfly.
the class DistributableSingleSignOnManagerServiceConfigurator method configure.
@Override
public ServiceConfigurator configure(OperationContext context) {
String securityDomainName = this.configuration.getSecurityDomainName();
Supplier<String> generator = this.configuration.getIdentifierGenerator();
CapabilityServiceSupport support = context.getCapabilityServiceSupport();
SupplierDependency<DistributableSSOManagementProvider> provider = getProvider(context, securityDomainName);
ServiceName managerServiceName = this.getServiceName().append("manager");
this.manager = new ServiceSupplierDependency<>(managerServiceName);
this.provider = provider;
this.installer = new Consumer<ServiceTarget>() {
@Override
public void accept(ServiceTarget target) {
ServiceConfigurator factoryConfigurator = provider.get().getServiceConfigurator(securityDomainName).configure(support);
factoryConfigurator.build(target).install();
SupplierDependency<SSOManagerFactory<ElytronAuthentication, String, Map.Entry<String, URI>, Batch>> factoryDependency = new ServiceSupplierDependency<>(factoryConfigurator);
SupplierDependency<SessionIdGenerator> generatorDependency = new SimpleSupplierDependency<>(new SessionIdGeneratorAdapter(generator));
new SSOManagerServiceConfigurator<>(managerServiceName, factoryDependency, generatorDependency, new LocalSSOContextFactory()).configure(support).build(target).install();
}
};
return this;
}
use of org.wildfly.clustering.web.sso.DistributableSSOManagementProvider in project wildfly by wildfly.
the class SSOManagementServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<DistributableSSOManagementProvider> provider = builder.provides(name);
Service service = Service.newInstance(provider, this.get());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations