Search in sources :

Example 1 with FlowHandler

use of org.springframework.webflow.mvc.servlet.FlowHandler 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 FlowHandler

use of org.springframework.webflow.mvc.servlet.FlowHandler 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)

Example 3 with FlowHandler

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

the class CasWebflowContextConfiguration method loginHandlerAdapter.

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

        @Override
        public boolean supports(final Object handler) {
            return super.supports(handler) && ((FlowHandler) handler).getFlowId().equals(CasWebflowConfigurer.FLOW_ID_LOGIN);
        }
    };
    handler.setFlowExecutor(loginFlowExecutor());
    handler.setFlowUrlHandler(loginFlowUrlHandler());
    return handler;
}
Also used : FlowHandlerAdapter(org.springframework.webflow.mvc.servlet.FlowHandlerAdapter) FlowHandler(org.springframework.webflow.mvc.servlet.FlowHandler) 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)3 Bean (org.springframework.context.annotation.Bean)3 FlowHandler (org.springframework.webflow.mvc.servlet.FlowHandler)3 FlowHandlerAdapter (org.springframework.webflow.mvc.servlet.FlowHandlerAdapter)3 CipherBean (org.cryptacular.bean.CipherBean)2 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)2