Package org.springframework.security.web.authentication

Examples of org.springframework.security.web.authentication.Http403ForbiddenEntryPoint


        PreAuthenticatedAuthenticationProvider authenticationProvider = new PreAuthenticatedAuthenticationProvider();
        authenticationProvider.setPreAuthenticatedUserDetailsService(getAuthenticationUserDetailsService(http));

        http
            .authenticationProvider(authenticationProvider)
            .setSharedObject(AuthenticationEntryPoint.class,new Http403ForbiddenEntryPoint());
    }
View Full Code Here


        authenticationProvider.setPreAuthenticatedUserDetailsService(getUserDetailsService());
        authenticationProvider = postProcess(authenticationProvider);

        http
            .authenticationProvider(authenticationProvider)
            .setSharedObject(AuthenticationEntryPoint.class,new Http403ForbiddenEntryPoint());
    }
View Full Code Here

        return entryPoint;
    }

    private AuthenticationEntryPoint createDefaultEntryPoint(H http) {
        if(defaultEntryPointMappings.isEmpty()) {
            return new Http403ForbiddenEntryPoint();
        }
        if(defaultEntryPointMappings.size() == 1) {
            return defaultEntryPointMappings.values().iterator().next();
        }
        DelegatingAuthenticationEntryPoint entryPoint = new DelegatingAuthenticationEntryPoint(defaultEntryPointMappings);
View Full Code Here

public class Http403ForbiddenEntryPointTests extends TestCase {

    public void testCommence() {
        MockHttpServletRequest req = new MockHttpServletRequest();
        MockHttpServletResponse resp = new MockHttpServletResponse();
        Http403ForbiddenEntryPoint fep = new Http403ForbiddenEntryPoint();
        try {
            fep.commence(req,resp,new AuthenticationCredentialsNotFoundException("test"));
            assertEquals("Incorrect status",resp.getStatus(),HttpServletResponse.SC_FORBIDDEN);
        } catch (IOException e) {
            fail("Unexpected exception thrown: "+e);
        } catch (ServletException e) {
            fail("Unexpected exception thrown: "+e);
View Full Code Here

@ImportResource({ "classpath:/META-INF/spring/spring-nanotrader-services/security.xml" })
public class SecurityConfig {

  @Bean
  public AuthenticationEntryPoint entryPoint() {
    return new Http403ForbiddenEntryPoint();
  }
View Full Code Here

        authenticationProvider.setPreAuthenticatedUserDetailsService(getUserDetailsService());
        authenticationProvider = postProcess(authenticationProvider);

        http
            .authenticationProvider(authenticationProvider)
            .setSharedObject(AuthenticationEntryPoint.class,new Http403ForbiddenEntryPoint());
    }
View Full Code Here

        if(entryPoint == null) {
            AuthenticationEntryPoint sharedEntryPoint = http.getSharedObject(AuthenticationEntryPoint.class);
            if(sharedEntryPoint != null) {
                entryPoint = sharedEntryPoint;
            } else {
                entryPoint = new Http403ForbiddenEntryPoint();
            }
        }
        return entryPoint;
    }
View Full Code Here

        PreAuthenticatedAuthenticationProvider authenticationProvider = new PreAuthenticatedAuthenticationProvider();
        authenticationProvider.setPreAuthenticatedUserDetailsService(getAuthenticationUserDetailsService(http));

        http
            .authenticationProvider(authenticationProvider)
            .setSharedObject(AuthenticationEntryPoint.class,new Http403ForbiddenEntryPoint());
    }
View Full Code Here

    @Override
    public void initializeFromConfig(SecurityNamedServiceConfig config) throws IOException {
        super.initializeFromConfig(config);
       
        aep=new Http403ForbiddenEntryPoint();
       
        AuthenticationKeyFilterConfig authConfig =
                (AuthenticationKeyFilterConfig) config;
        setAuthKeyParamName(authConfig.getAuthKeyParamName());
        setUserGroupServiceName(authConfig.getUserGroupServiceName());
View Full Code Here

   
    @Override
    public void initializeFromConfig(SecurityNamedServiceConfig config) throws IOException {
        super.initializeFromConfig(config);

        aep = new Http403ForbiddenEntryPoint();

        CredentialsFromRequestHeaderFilterConfig authConfig = (CredentialsFromRequestHeaderFilterConfig) config;

        userNameHeaderName = authConfig.getUserNameHeaderName();
        passwordHeaderName = authConfig.getPasswordHeaderName();
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.Http403ForbiddenEntryPoint

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.