Examples of AuthorizationFilter


Examples of org.apache.activemq.shiro.authz.AuthorizationFilter

        assertSame(plugin.getSubjectFilter().getNext(), filter);
    }

    public void testSetAuthorizationFilter() {
        ShiroPlugin plugin = new ShiroPlugin();
        AuthorizationFilter filter = new AuthorizationFilter();
        plugin.setAuthorizationFilter(filter);
        assertSame(filter, plugin.getAuthorizationFilter());
        //assert that the AuthenticationFilter is always the next filter in the chain after the AuthenticationFilter:
        assertSame(plugin.getAuthenticationFilter().getNext(), filter);
    }
View Full Code Here

Examples of org.apache.activemq.shiro.authz.AuthorizationFilter

    public ShiroPlugin() {

        //Default if this.environment is not configured. See the ensureEnvironment() method below.
        iniEnvironment = new IniEnvironment();

        authorizationFilter = new AuthorizationFilter();

        // we want to share one AuthenticationPolicy instance across both the AuthenticationFilter and the
        // ConnectionSubjectFactory:
        AuthenticationPolicy authcPolicy = new DefaultAuthenticationPolicy();
View Full Code Here

Examples of org.apache.shiro.web.filter.authz.AuthorizationFilter

    }

    private void applyUnauthorizedUrlIfNecessary(Filter filter) {
        String unauthorizedUrl = getUnauthorizedUrl();
        if (StringUtils.hasText(unauthorizedUrl) && (filter instanceof AuthorizationFilter)) {
            AuthorizationFilter authzFilter = (AuthorizationFilter) filter;
            //only apply the unauthorizedUrl if they haven't explicitly configured one already:
            String existingUnauthorizedUrl = authzFilter.getUnauthorizedUrl();
            if (existingUnauthorizedUrl == null) {
                authzFilter.setUnauthorizedUrl(unauthorizedUrl);
            }
        }
    }
View Full Code Here

Examples of org.apache.shiro.web.filter.authz.AuthorizationFilter

    }

    private void applyUnauthorizedUrlIfNecessary(Filter filter) {
        String unauthorizedUrl = getUnauthorizedUrl();
        if (StringUtils.hasText(unauthorizedUrl) && (filter instanceof AuthorizationFilter)) {
            AuthorizationFilter authzFilter = (AuthorizationFilter) filter;
            //only apply the unauthorizedUrl if they haven't explicitly configured one already:
            String existingUnauthorizedUrl = authzFilter.getUnauthorizedUrl();
            if (existingUnauthorizedUrl == null) {
                authzFilter.setUnauthorizedUrl(unauthorizedUrl);
            }
        }
    }
View Full Code Here

Examples of org.apache.shiro.web.filter.authz.AuthorizationFilter

    }

    private void applyUnauthorizedUrlIfNecessary(Filter filter) {
        String unauthorizedUrl = getUnauthorizedUrl();
        if (StringUtils.hasText(unauthorizedUrl) && (filter instanceof AuthorizationFilter)) {
            AuthorizationFilter authzFilter = (AuthorizationFilter) filter;
            //only apply the unauthorizedUrl if they haven't explicitly configured one already:
            String existingUnauthorizedUrl = authzFilter.getUnauthorizedUrl();
            if (existingUnauthorizedUrl == null) {
                authzFilter.setUnauthorizedUrl(unauthorizedUrl);
            }
        }
    }
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.