Package org.springframework.security.web.access.expression

Examples of org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler


        return new ExpressionBasedFilterInvocationSecurityMetadataSource(requestMap, getExpressionHandler(http));
    }

    private SecurityExpressionHandler<FilterInvocation> getExpressionHandler(H http) {
        if(expressionHandler == null) {
            DefaultWebSecurityExpressionHandler defaultHandler = new DefaultWebSecurityExpressionHandler();
            AuthenticationTrustResolver trustResolver = http.getSharedObject(AuthenticationTrustResolver.class);
            if(trustResolver != null) {
                defaultHandler.setTrustResolver(trustResolver);
            }
            expressionHandler = postProcess(defaultHandler);
        }

        return expressionHandler;
View Full Code Here


    static class AllPropertiesWorkConfig extends WebSecurityConfigurerAdapter {

        @SuppressWarnings("rawtypes")
        @Override
        protected void configure(HttpSecurity http) throws Exception {
            SecurityExpressionHandler<FilterInvocation> handler = new DefaultWebSecurityExpressionHandler();
            WebExpressionVoter expressionVoter = new WebExpressionVoter();
            AffirmativeBased adm = new AffirmativeBased(Arrays.<AccessDecisionVoter>asList(expressionVoter));
            http
                .authorizeRequests()
                    .expressionHandler(handler)
View Full Code Here

        map.put(matcher, atts);

        atts.add(new SecurityConfig(access));

        ExpressionBasedFilterInvocationSecurityMetadataSource ms = new ExpressionBasedFilterInvocationSecurityMetadataSource(map,
                new DefaultWebSecurityExpressionHandler());
       
        return ms.getAllConfigAttributes();
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler

Copyright © 2018 www.massapicom. 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.