Example usage for org.apache.shiro.spring.web.config ShiroFilterChainDefinition getFilterChainMap

List of usage examples for org.apache.shiro.spring.web.config ShiroFilterChainDefinition getFilterChainMap

Introduction

In this page you can find the example usage for org.apache.shiro.spring.web.config ShiroFilterChainDefinition getFilterChainMap.

Prototype

Map<String, String> getFilterChainMap();

Source Link

Usage

From source file:com.smile.core.shiro.configuration.ShiroConfiguration.java

License:Apache License

@Bean
protected ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager,
        Filter authenticationFilter, ShiroFilterChainDefinition shiroFilterChainDefinition) {
    ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
    shiroFilterFactoryBean.setLoginUrl("/login");
    shiroFilterFactoryBean.setSuccessUrl("/");
    shiroFilterFactoryBean.setUnauthorizedUrl("/unauthorized");
    shiroFilterFactoryBean.setSecurityManager(securityManager);
    Map<String, Filter> filterMap = new HashMap<String, Filter>();
    filterMap.put("authc", authenticationFilter);
    shiroFilterFactoryBean.setFilters(filterMap);
    shiroFilterFactoryBean.setFilterChainDefinitionMap(shiroFilterChainDefinition.getFilterChainMap());
    return shiroFilterFactoryBean;
}