use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasSecurityContextConfiguration method requiresAuthenticationStatusAdminEndpointsInterceptor.
@RefreshScope
@Bean
public SecurityInterceptor requiresAuthenticationStatusAdminEndpointsInterceptor() {
final Config cfg = config();
if (cfg.getClients() == null) {
return requiresAuthenticationStatusInterceptor();
}
final CasAdminPagesSecurityInterceptor interceptor = new CasAdminPagesSecurityInterceptor(cfg, CAS_CLIENT_NAME, "securityHeaders,csrfToken,".concat(getAuthorizerName()));
return interceptor;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasWebflowContextConfiguration method builder.
@RefreshScope
@Bean
public FlowBuilderServices builder() {
final FlowBuilderServicesBuilder builder = new FlowBuilderServicesBuilder(this.applicationContext);
builder.setViewFactoryCreator(viewFactoryCreator());
builder.setExpressionParser(expressionParser());
builder.setDevelopmentMode(casProperties.getWebflow().isRefresh());
return builder.build();
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasWebflowContextConfiguration method logoutFlowExecutor.
@RefreshScope
@Bean
public FlowExecutor logoutFlowExecutor() {
final FlowExecutorBuilder builder = new FlowExecutorBuilder(logoutFlowRegistry(), this.applicationContext);
builder.setAlwaysRedirectOnPause(casProperties.getWebflow().isAlwaysPauseRedirect());
builder.setRedirectInSameState(casProperties.getWebflow().isRedirectSameState());
return builder.build();
}
use of org.springframework.cloud.context.config.annotation.RefreshScope 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.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CasRestAuthenticationConfiguration method restAuthenticationHandler.
@Bean
@RefreshScope
public AuthenticationHandler restAuthenticationHandler() {
final RestAuthenticationProperties rest = casProperties.getAuthn().getRest();
final RestAuthenticationHandler r = new RestAuthenticationHandler(rest.getName(), restAuthenticationApi());
r.setPasswordEncoder(Beans.newPasswordEncoder(rest.getPasswordEncoder()));
return r;
}
Aggregations