Examples of MethodSecurityInterceptor


Examples of org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor

     * @return
     * @throws Exception
     */
    @Bean
    public MethodInterceptor methodSecurityInterceptor() throws Exception {
        MethodSecurityInterceptor methodSecurityInterceptor = isAspectJ() ? new AspectJMethodSecurityInterceptor() : new MethodSecurityInterceptor();
        methodSecurityInterceptor
                .setAccessDecisionManager(accessDecisionManager());
        methodSecurityInterceptor
                .setAfterInvocationManager(afterInvocationManager());
        methodSecurityInterceptor
                .setAuthenticationManager(authenticationManager());
        methodSecurityInterceptor
                .setSecurityMetadataSource(methodSecurityMetadataSource());
        RunAsManager runAsManager = runAsManager();
        if (runAsManager != null) {
            methodSecurityInterceptor.setRunAsManager(runAsManager);
        }
        return methodSecurityInterceptor;
    }
View Full Code Here

Examples of org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor

    //~ Methods ========================================================================================================

    @Before
    public final void setUp() throws Exception {
        SecurityContextHolder.clearContext();
        interceptor = new MethodSecurityInterceptor();
        token = new TestingAuthenticationToken("Test", "Password", "ROLE_SOMETHING");
        adm = mock(AccessDecisionManager.class);
        AuthenticationManager authman = mock(AuthenticationManager.class);
        mds = mock(MethodSecurityMetadataSource.class);
        interceptor.setAccessDecisionManager(adm);
View Full Code Here

Examples of org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor

     * @return
     * @throws Exception
     */
    @Bean
    public MethodInterceptor methodSecurityInterceptor() throws Exception {
        MethodSecurityInterceptor methodSecurityInterceptor = new MethodSecurityInterceptor();
        methodSecurityInterceptor
                .setAccessDecisionManager(accessDecisionManager());
        methodSecurityInterceptor
                .setAfterInvocationManager(afterInvocationManager());
        methodSecurityInterceptor
                .setAuthenticationManager(authenticationManager());
        methodSecurityInterceptor
                .setSecurityMetadataSource(methodSecurityMetadataSource());
        RunAsManager runAsManager = runAsManager();
        if (runAsManager != null) {
            methodSecurityInterceptor.setRunAsManager(runAsManager);
        }
        return methodSecurityInterceptor;
    }
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.