Package org.springframework.security.web.authentication

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


    @Marker( SpringSecurityServices.class )
    public static AuthenticationEntryPoint buildAuthenticationEntryPoint(
            @Inject @Value( "${spring-security.loginform.url}" ) final String loginFormUrl,
            @Inject @Value( "${spring-security.force.ssl.login}" ) final String forceHttps ) throws Exception {

      final LoginUrlAuthenticationEntryPoint entryPoint = new LoginUrlAuthenticationEntryPoint(loginFormUrl);
        entryPoint.afterPropertiesSet();
        boolean forceSSL = Boolean.parseBoolean( forceHttps );
        entryPoint.setForceHttps( forceSSL );
        return entryPoint;
    }
View Full Code Here


    @Marker( SpringSecurityServices.class )
    public static AuthenticationEntryPoint buildAuthenticationEntryPoint(
            @Inject @Value( "${spring-security.loginform.url}" ) final String loginFormUrl,
            @Inject @Value( "${spring-security.force.ssl.login}" ) final String forceHttps ) throws Exception {

      final LoginUrlAuthenticationEntryPoint entryPoint = new LoginUrlAuthenticationEntryPoint(loginFormUrl);
        entryPoint.afterPropertiesSet();
        boolean forceSSL = Boolean.parseBoolean( forceHttps );
        entryPoint.setForceHttps( forceSSL );
        return entryPoint;
    }
View Full Code Here

    public void setUp() throws Exception {
        AnonymousAuthenticationFilter aaf = new AnonymousAuthenticationFilter("anonymous");
        fsi = new FilterSecurityInterceptor();
        fsi.setAccessDecisionManager(accessDecisionManager);
        fsi.setSecurityMetadataSource(metadataSource);
        AuthenticationEntryPoint authenticationEntryPoint = new LoginUrlAuthenticationEntryPoint("/login");
        ExceptionTranslationFilter etf = new ExceptionTranslationFilter(authenticationEntryPoint);
        DefaultSecurityFilterChain securityChain = new DefaultSecurityFilterChain(AnyRequestMatcher.INSTANCE, aaf, etf, fsi);
        fcp = new FilterChainProxy(securityChain);
        validator = new DefaultFilterChainValidator();
        Whitebox.setInternalState(validator, "logger", logger);
View Full Code Here

     * Sets the loginPage and updates the {@link AuthenticationEntryPoint}.
     * @param loginPage
     */
    private void setLoginPage(String loginPage) {
        this.loginPage = loginPage;
        this.authenticationEntryPoint = new LoginUrlAuthenticationEntryPoint(
                loginPage);
    }
View Full Code Here

                http.requiresChannel().anyRequest().requiresSecure();
            }
        }

        private AuthenticationEntryPoint authenticationEntryPoint() {
            LoginUrlAuthenticationEntryPoint entryPoint = new LoginUrlAuthenticationEntryPoint("/signin");
            entryPoint.setForceHttps(isForceHttps());
            return entryPoint;
        }
View Full Code Here

        .permitAll()
        .and()
        .httpBasic()
        .and()
        .exceptionHandling()
        .defaultAuthenticationEntryPointFor(new LoginUrlAuthenticationEntryPoint(loginPage), textHtmlMatcher)
        .defaultAuthenticationEntryPointFor(basicAuthenticationEntryPoint, AnyRequestMatcher.INSTANCE);
  }
View Full Code Here

     * specified URL to generate a login page.
     * </p>
     */
    protected T loginPage(String loginPage) {
        this.loginPage = loginPage;
        this.authenticationEntryPoint = new LoginUrlAuthenticationEntryPoint(loginPage);
        this.customLoginPage = true;
        return getSelf();
    }
View Full Code Here

       
        pathInfos=GeoServerSecurityFilterChain.FORM_LOGIN_CHAIN.split(",");
       
        UsernamePasswordAuthenticationFilterConfig upConfig = (UsernamePasswordAuthenticationFilterConfig) config;
       
        aep=new LoginUrlAuthenticationEntryPoint(URL_LOGIN_FORM);
        aep.setForceHttps(false);
        try {
            aep.afterPropertiesSet();
        } catch (Exception e2) {
            throw new IOException(e2);
View Full Code Here

    @Bean
    public Filter exceptionTranslationFilter(RequestCache requestCache) {
        AccessDeniedHandlerImpl accessDeniedHandler = new AccessDeniedHandlerImpl();
        accessDeniedHandler.setErrorPage(applicationUrl("/access-denied"));
        LoginUrlAuthenticationEntryPoint authenticationEntryPoint = new LoginUrlAuthenticationEntryPoint(applicationUrl("/login"));
        ExceptionTranslationFilter exceptionTranslationFilter = new ExceptionTranslationFilter(authenticationEntryPoint, requestCache);
        exceptionTranslationFilter.setAccessDeniedHandler(accessDeniedHandler);
        return exceptionTranslationFilter;
    }
View Full Code Here

TOP

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

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.