Examples of RoleVoter


Examples of org.springframework.security.access.vote.RoleVoter

        ExpressionBasedPreInvocationAdvice expressionAdvice = new ExpressionBasedPreInvocationAdvice();
        expressionAdvice.setExpressionHandler(getExpressionHandler());

        decisionVoters.add(new PreInvocationAuthorizationAdviceVoter(
                expressionAdvice));
        decisionVoters.add(new RoleVoter());
        decisionVoters.add(new AuthenticatedVoter());
        return new AffirmativeBased(decisionVoters);
    }
View Full Code Here

Examples of org.springframework.security.access.vote.RoleVoter

     */
    @Override
    @SuppressWarnings("rawtypes")
    final List<AccessDecisionVoter> getDecisionVoters() {
        List<AccessDecisionVoter> decisionVoters = new ArrayList<AccessDecisionVoter>();
        decisionVoters.add(new RoleVoter());
        decisionVoters.add(new AuthenticatedVoter());
        return decisionVoters;
    }
View Full Code Here

Examples of org.springframework.security.access.vote.RoleVoter

public class MyAppSpringConfiguration {


    @Bean
    public RoleVoter getRoleVoter() {
        RoleVoter roleVoter = new RoleVoter();
        roleVoter.setRolePrefix("ROLE _");
        return roleVoter;
    }
View Full Code Here

Examples of org.springframework.security.access.vote.RoleVoter

        FilterSecurityInterceptor filter = new FilterSecurityInterceptor();

        filter.setAuthenticationManager(getSecurityManager());
       
        List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>();
        RoleVoter roleVoter = new RoleVoter();
        roleVoter.setRolePrefix("");
        voters.add(roleVoter);
        voters.add(new AuthenticatedVoter());
        AffirmativeBased accessDecisionManager = new AffirmativeBased(voters);
        accessDecisionManager.setAllowIfAllAbstainDecisions(siConfig.isAllowIfAllAbstainDecisions());
        filter.setAccessDecisionManager(accessDecisionManager);       
View Full Code Here

Examples of org.springframework.security.access.vote.RoleVoter

    @Bean
    @Autowired
    public Filter filterSecurityInterceptor(AuthenticationManager authenticationManager) throws Exception {
        FilterSecurityInterceptor filter = new FilterSecurityInterceptor();
        filter.setAuthenticationManager(authenticationManager);
        filter.setAccessDecisionManager(new AffirmativeBased(asList((AccessDecisionVoter) new RoleVoter())));
        filter.setSecurityMetadataSource(securityMetadataSource());
        filter.afterPropertiesSet();
        return filter;
    }
View Full Code Here

Examples of org.springframework.security.vote.RoleVoter

     * Constructor.
     */
    public UserRoleSecurityController() {
        // Install the default decision manager
        AffirmativeBased adm = new AffirmativeBased();
        adm.setDecisionVoters( Arrays.asList( new RoleVoter[] { new RoleVoter() } ) );
        setAccessDecisionManager( adm );
    }
View Full Code Here

Examples of org.springframework.security.vote.RoleVoter

    if (accessDecisionManager != null) {
      accessDecisionManager.decide(authentication, object, config);
    } else {
      AbstractAccessDecisionManager abstractAccessDecisionManager;
      List voters = new ArrayList();
      voters.add(new RoleVoter());
      if (rule.getComparisonType() == SecurityRule.COMPARISON_ANY) {
        abstractAccessDecisionManager = new AffirmativeBased();
      } else if (rule.getComparisonType() == SecurityRule.COMPARISON_ALL) {
        abstractAccessDecisionManager = new UnanimousBased();
      } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.