本文整理了Java中org.springframework.security.access.vote.AffirmativeBased.afterPropertiesSet()
方法的一些代码示例,展示了AffirmativeBased.afterPropertiesSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AffirmativeBased.afterPropertiesSet()
方法的具体详情如下:
包路径:org.springframework.security.access.vote.AffirmativeBased
类名称:AffirmativeBased
方法名:afterPropertiesSet
暂无
代码示例来源:origin: spring-projects/spring-security
@Test
public void oneAffirmativeVoteOneDenyVoteOneAbstainVoteGrantsAccess()
throws Exception {
mgr = new AffirmativeBased(Arrays.<AccessDecisionVoter<? extends Object>> asList(
grant, deny, abstain));
mgr.afterPropertiesSet();
mgr.decide(user, new Object(), attrs);
}
代码示例来源:origin: spring-projects/spring-integration
@SuppressWarnings("rawtypes")
private static ChannelSecurityInterceptor createInterceptor(String role) throws Exception {
ChannelSecurityMetadataSource securityMetadataSource = new ChannelSecurityMetadataSource();
securityMetadataSource.addPatternMapping(Pattern.compile("secured.*"), new DefaultChannelAccessPolicy(role, null));
ChannelSecurityInterceptor interceptor = new ChannelSecurityInterceptor(securityMetadataSource);
AffirmativeBased accessDecisionManager = AffirmativeBased.class.getConstructor(List.class)
.newInstance(Collections.singletonList(new RoleVoter()));
accessDecisionManager.afterPropertiesSet();
interceptor.setAccessDecisionManager(accessDecisionManager);
interceptor.setAuthenticationManager(new MockAuthenticationManager(true));
interceptor.afterPropertiesSet();
return interceptor;
}
代码示例来源:origin: stackoverflow.com
AffirmativeBased affirmativeBased = new AffirmativeBased(voters);
affirmativeBased.setAllowIfAllAbstainDecisions(false);
affirmativeBased.afterPropertiesSet();
内容来源于网络,如有侵权,请联系作者删除!