Package org.springframework.security.web.authentication.www

Examples of org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint.afterPropertiesSet()


    public void testDetectsMissingRealmName() throws Exception {
        BasicAuthenticationEntryPoint ep = new BasicAuthenticationEntryPoint();

        try {
            ep.afterPropertiesSet();
            fail("Should have thrown IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            assertEquals("realmName must be specified", expected.getMessage());
        }
    }
View Full Code Here


    final String loginPage = "/admin-ui/login";

    BasicAuthenticationEntryPoint basicAuthenticationEntryPoint = new BasicAuthenticationEntryPoint();
    basicAuthenticationEntryPoint.setRealmName(realm);
    basicAuthenticationEntryPoint.afterPropertiesSet();

    http.csrf().disable()
        .authorizeRequests()
        .antMatchers("/admin-ui/styles/**").permitAll()
        .antMatchers("/admin-ui/images/**").permitAll()
 
View Full Code Here

     * @throws Exception
     */
    public HttpBasicConfigurer<B> realmName(String realmName) throws Exception {
        BasicAuthenticationEntryPoint basicAuthEntryPoint = new BasicAuthenticationEntryPoint();
        basicAuthEntryPoint.setRealmName(realmName);
        basicAuthEntryPoint.afterPropertiesSet();
        return authenticationEntryPoint(basicAuthEntryPoint);
    }

    /**
     * The {@link AuthenticationEntryPoint} to be po  pulated on
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.