io.buji.pac4j.subject.Pac4jSubjectFactory Java Examples

The following examples show how to use io.buji.pac4j.subject.Pac4jSubjectFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShiroConfiguration.java    From sso with MIT License 5 votes vote down vote up
/**
 * 对过滤器进行调整
 *
 * @return
 */
@Bean
protected ShiroFilterFactoryBean shiroFilterFactoryBean() {
    //把subject对象设为subjectFactory
    //由于cas代理了用户,所以必须通过cas进行创建对象
    ((DefaultSecurityManager) securityManager).setSubjectFactory(new Pac4jSubjectFactory());

    ShiroFilterFactoryBean filterFactoryBean = super.shiroFilterFactoryBean();
    filterFactoryBean.setFilters(shiroFilters());
    return filterFactoryBean;
}
 
Example #2
Source File: ShiroConfiguration.java    From springboot-shiro-cas-mybatis with MIT License 2 votes vote down vote up
/**
 * 由于cas代理了用户,所以必须通过cas进行创建对象
 *
 * @return
 */
@Bean(name = "subjectFactory")
protected SubjectFactory subjectFactory() {
    return new Pac4jSubjectFactory();
}
 
Example #3
Source File: ShiroConfiguration.java    From wolf with MIT License 2 votes vote down vote up
/**
 * 由于cas代理了用户,所以必须通过cas进行创建对象
 *
 * @return
 */
@Bean
protected SubjectFactory subjectFactory() {
    return new Pac4jSubjectFactory();
}