Java Code Examples for org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#setSecurityManager()

The following examples show how to use org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#setSecurityManager() . 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: ShiroConfig.java    From frpMgr with MIT License 5 votes vote down vote up
/**
 * 启用Shrio授权注解拦截方式,AOP式方法级权限检查
 */
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(WebSecurityManager securityManager) {
	AuthorizationAttributeSourceAdvisor bean = new AuthorizationAttributeSourceAdvisor();
	bean.setSecurityManager(securityManager);
	return bean;
}
 
Example 2
Source File: ShiroConfig.java    From mysiteforme with Apache License 2.0 5 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(@Qualifier("authRealm")AuthRealm authRealm) {
    SecurityManager manager= securityManager(authRealm);
    AuthorizationAttributeSourceAdvisor advisor=new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(manager);
    return advisor;
}
 
Example 3
Source File: ShiroManager.java    From shiro-spring-boot with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultSecurityManager securityManager) {
	AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
	aasa.setSecurityManager(securityManager);
	return new AuthorizationAttributeSourceAdvisor();
}
 
Example 4
Source File: ShiroConfig.java    From fastdep with Apache License 2.0 5 votes vote down vote up
/**
 * AuthorizationAttributeSourceAdvisor
 *
 * @param securityManager securityManager bean
 * @return AuthorizationAttributeSourceAdvisor
 */
@Bean
@ConditionalOnMissingBean(AuthorizationAttributeSourceAdvisor.class)
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 5
Source File: ShiroConfig.java    From blog-sample with Apache License 2.0 5 votes vote down vote up
/**
 * 注册AuthorizationAttributeSourceAdvisor
 * 如果要开启注解,必须添加
 */
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager manager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(manager);

    return advisor;
}
 
Example 6
Source File: ShiroConfig.java    From Goku.Framework.CoreUI with MIT License 5 votes vote down vote up
/**
 * AuthorizationAttributeSourceAdvisor,shiro里实现的Advisor类,
 * 内部使用AopAllianceAnnotationsAuthorizingMethodInterceptor来拦截用以下注解的方法。
 */
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor() {
    AuthorizationAttributeSourceAdvisor aASA = new AuthorizationAttributeSourceAdvisor();
    aASA.setSecurityManager(securityManager());
    return aASA;
}
 
Example 7
Source File: ShiroConfig.java    From easyweb-shiro with MIT License 5 votes vote down vote up
/**
 * shiro里实现的Advisor类,用来拦截注解的方法 .
 */
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor() {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager());
    return advisor;
}
 
Example 8
Source File: ShiroConfig.java    From springboot-shiro-cas-mybatis with MIT License 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager){
	AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
	advisor.setSecurityManager(securityManager);
	return advisor;
}
 
Example 9
Source File: ShiroAuthConfig.java    From Moss with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 10
Source File: ShiroConfig.java    From sdb-mall with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 11
Source File: ShiroFilterConfiguration.java    From wolf with MIT License 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(SecurityManager securityManager){
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 12
Source File: ShiroConfig.java    From jeecg-boot with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
	AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
	advisor.setSecurityManager(securityManager);
	return advisor;
}
 
Example 13
Source File: AbstractIamConfiguration.java    From super-cloudops with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
	AuthorizationAttributeSourceAdvisor authzAdvisor = new AuthorizationAttributeSourceAdvisor();
	authzAdvisor.setSecurityManager(securityManager);
	return authzAdvisor;
}
 
Example 14
Source File: ShiroJwtConfig.java    From hdw-dubbo with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 15
Source File: ShiroConfig.java    From roncoo-pay with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(@Qualifier("securityManager") DefaultWebSecurityManager defaultWebSecurityManager){
    AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
    authorizationAttributeSourceAdvisor.setSecurityManager(defaultWebSecurityManager);
    return authorizationAttributeSourceAdvisor;
}
 
Example 16
Source File: ShiroConfig.java    From teaching with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
	AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
	advisor.setSecurityManager(securityManager);
	return advisor;
}
 
Example 17
Source File: ShiroConfiguration.java    From jee-universal-bms with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor() {
    AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
    aasa.setSecurityManager(getDefaultWebSecurityManager());
    return new AuthorizationAttributeSourceAdvisor();
}
 
Example 18
Source File: ShiroConfig.java    From kvf-admin with MIT License 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}
 
Example 19
Source File: ShiroConfiguration.java    From easyweb with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
    aasa.setSecurityManager(securityManager);
    return aasa;
}
 
Example 20
Source File: ShiroConfig.java    From springboot-admin with Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
    AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
    advisor.setSecurityManager(securityManager);
    return advisor;
}