Search in sources :

Example 1 with FlowHandlerAdapter

use of org.springframework.webflow.mvc.servlet.FlowHandlerAdapter in project cas by apereo.

the class PasswordManagementConfiguration method passwordResetHandlerAdapter.

@RefreshScope
@Bean
public HandlerAdapter passwordResetHandlerAdapter() {
    final FlowHandlerAdapter handler = new FlowHandlerAdapter() {

        @Override
        public boolean supports(final Object handler) {
            return super.supports(handler) && ((FlowHandler) handler).getFlowId().equals(PasswordManagementWebflowConfigurer.FLOW_ID_PASSWORD_RESET);
        }
    };
    handler.setFlowExecutor(loginFlowExecutor);
    return handler;
}
Also used : FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) FlowHandler(org.springframework.webflow.mvc.servlet.FlowHandler) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with FlowHandlerAdapter

use of org.springframework.webflow.mvc.servlet.FlowHandlerAdapter in project cas by apereo.

the class PasswordManagementWebflowConfiguration method passwordResetHandlerAdapter.

@RefreshScope
@Bean
public HandlerAdapter passwordResetHandlerAdapter() {
    final FlowHandlerAdapter handler = new FlowHandlerAdapter() {

        @Override
        public boolean supports(final Object handler) {
            return super.supports(handler) && ((FlowHandler) handler).getFlowId().equals(PasswordManagementWebflowConfigurer.FLOW_ID_PASSWORD_RESET);
        }
    };
    handler.setFlowExecutor(loginFlowExecutor);
    return handler;
}
Also used : FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) FlowHandler(org.springframework.webflow.mvc.servlet.FlowHandler) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 3 with FlowHandlerAdapter

use of org.springframework.webflow.mvc.servlet.FlowHandlerAdapter in project cas by apereo.

the class CasWebflowContextConfiguration method loginHandlerAdapter.

@Bean
public HandlerAdapter loginHandlerAdapter() {
    final FlowHandlerAdapter handler = new CasFlowHandlerAdapter(CasWebflowConfigurer.FLOW_ID_LOGIN);
    handler.setFlowExecutor(loginFlowExecutor());
    handler.setFlowUrlHandler(loginFlowUrlHandler());
    return handler;
}
Also used : CasFlowHandlerAdapter(org.apereo.cas.web.flow.CasFlowHandlerAdapter) FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) CasFlowHandlerAdapter(org.apereo.cas.web.flow.CasFlowHandlerAdapter) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 4 with FlowHandlerAdapter

use of org.springframework.webflow.mvc.servlet.FlowHandlerAdapter in project cas by apereo.

the class CasWebflowContextConfiguration method logoutHandlerAdapter.

@RefreshScope
@Bean
public HandlerAdapter logoutHandlerAdapter() {
    final FlowHandlerAdapter handler = new CasFlowHandlerAdapter(CasWebflowConfigurer.FLOW_ID_LOGOUT);
    handler.setFlowExecutor(logoutFlowExecutor());
    handler.setFlowUrlHandler(logoutFlowUrlHandler());
    return handler;
}
Also used : CasFlowHandlerAdapter(org.apereo.cas.web.flow.CasFlowHandlerAdapter) FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) CasFlowHandlerAdapter(org.apereo.cas.web.flow.CasFlowHandlerAdapter) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 5 with FlowHandlerAdapter

use of org.springframework.webflow.mvc.servlet.FlowHandlerAdapter in project cas by apereo.

the class CasWebflowContextConfiguration method logoutHandlerAdapter.

@RefreshScope
@Bean
public HandlerAdapter logoutHandlerAdapter() {
    final FlowHandlerAdapter handler = new FlowHandlerAdapter() {

        @Override
        public boolean supports(final Object handler) {
            return super.supports(handler) && ((FlowHandler) handler).getFlowId().equals(CasWebflowConfigurer.FLOW_ID_LOGOUT);
        }
    };
    handler.setFlowExecutor(logoutFlowExecutor());
    handler.setFlowUrlHandler(logoutFlowUrlHandler());
    return handler;
}
Also used : FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) FlowHandler(org.springframework.webflow.mvc.servlet.FlowHandler) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) CipherBean(org.cryptacular.bean.CipherBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)6 Bean (org.springframework.context.annotation.Bean)6 FlowHandlerAdapter (org.springframework.webflow.mvc.servlet.FlowHandlerAdapter)6 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)4 FlowHandler (org.springframework.webflow.mvc.servlet.FlowHandler)4 CasFlowHandlerAdapter (org.apereo.cas.web.flow.CasFlowHandlerAdapter)2 CipherBean (org.cryptacular.bean.CipherBean)2