use of org.springframework.context.annotation.Bean in project spring-framework by spring-projects.
the class AbstractMessageBrokerConfiguration method userRegistryMessageHandler.
@Bean
public MessageHandler userRegistryMessageHandler() {
if (getBrokerRegistry().getUserRegistryBroadcast() == null) {
return new NoOpMessageHandler();
}
SimpUserRegistry userRegistry = userRegistry();
Assert.isInstanceOf(MultiServerUserRegistry.class, userRegistry, "MultiServerUserRegistry required");
return new UserRegistryMessageHandler((MultiServerUserRegistry) userRegistry, brokerMessagingTemplate(), getBrokerRegistry().getUserRegistryBroadcast(), messageBrokerTaskScheduler());
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class OpenIdConfiguration method serverManager.
@RefreshScope
@Bean
public ServerManager serverManager() {
final ServerManager manager = new ServerManager();
manager.setOPEndpointUrl(casProperties.getServer().getLoginUrl());
manager.setEnforceRpId(casProperties.getAuthn().getOpenid().isEnforceRpId());
manager.setSharedAssociations(new InMemoryServerAssociationStore());
LOGGER.info("Creating openid server manager with OP endpoint [{}]", casProperties.getServer().getLoginUrl());
return manager;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class OpenIdAuthenticationEventExecutionPlanConfiguration method openIdPrincipalResolver.
@Bean
public OpenIdPrincipalResolver openIdPrincipalResolver() {
final OpenIdPrincipalResolver r = new OpenIdPrincipalResolver();
r.setAttributeRepository(attributeRepository);
r.setPrincipalAttributeName(casProperties.getAuthn().getOpenid().getPrincipal().getPrincipalAttribute());
r.setReturnNullIfNoAttributes(casProperties.getAuthn().getOpenid().getPrincipal().isReturnNull());
r.setPrincipalFactory(openidPrincipalFactory());
return r;
}
use of org.springframework.context.annotation.Bean in project cas by apereo.
the class RadiusMultifactorConfiguration method radiusFlowRegistry.
@Bean
public FlowDefinitionRegistry radiusFlowRegistry() {
final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
builder.setBasePath("classpath*:/webflow");
builder.addFlowLocationPattern("/mfa-radius/*-webflow.xml");
return builder.build();
}
use of org.springframework.context.annotation.Bean in project spring-boot by spring-projects.
the class EndpointMBeanExportAutoConfiguration method endpointMBeanExporter.
@Bean
public EndpointMBeanExporter endpointMBeanExporter(MBeanServer server) {
EndpointMBeanExporter mbeanExporter = new EndpointMBeanExporter(this.objectMapper);
String domain = this.properties.getDomain();
if (StringUtils.hasText(domain)) {
mbeanExporter.setDomain(domain);
}
mbeanExporter.setServer(server);
mbeanExporter.setEnsureUniqueRuntimeObjectNames(this.properties.isUniqueNames());
mbeanExporter.setObjectNameStaticProperties(this.properties.getStaticNames());
return mbeanExporter;
}
Aggregations