Package org.springframework.security.web

Examples of org.springframework.security.web.AuthenticationEntryPoint


        return this.authenticationEntryPoint;
    }

    @Override
    public void configure(H http) throws Exception {
        AuthenticationEntryPoint entryPoint = getEntryPoint(http);
        ExceptionTranslationFilter exceptionTranslationFilter = new ExceptionTranslationFilter(entryPoint, getRequestCache(http));
        if(accessDeniedHandler != null) {
            exceptionTranslationFilter.setAccessDeniedHandler(accessDeniedHandler);
        }
        exceptionTranslationFilter = postProcess(exceptionTranslationFilter);
View Full Code Here


     * Gets the {@link AuthenticationEntryPoint} according to the rules specified by {@link #authenticationEntryPoint(AuthenticationEntryPoint)}
     * @param http the {@link HttpSecurity} used to look up shared {@link AuthenticationEntryPoint}
     * @return the {@link AuthenticationEntryPoint} to use
     */
    private AuthenticationEntryPoint getEntryPoint(H http) {
        AuthenticationEntryPoint entryPoint = this.authenticationEntryPoint;
        if(entryPoint == null) {
            AuthenticationEntryPoint sharedEntryPoint = http.getSharedObject(AuthenticationEntryPoint.class);
            if(sharedEntryPoint != null) {
                entryPoint = sharedEntryPoint;
            } else {
                entryPoint = new Http403ForbiddenEntryPoint();
            }
View Full Code Here

    }

    @Override
    @SuppressWarnings("unchecked")
    public void configure(H http) throws Exception {
        AuthenticationEntryPoint authenticationEntryPoint = null;
        ExceptionHandlingConfigurer<?> exceptionConf = http.getConfigurer(ExceptionHandlingConfigurer.class);
        if(exceptionConf != null) {
            authenticationEntryPoint = exceptionConf.getAuthenticationEntryPoint();
        }
View Full Code Here

        @Override
        public void commence(HttpServletRequest request, HttpServletResponse response,
                AuthenticationException authException) throws IOException, ServletException {

            AuthenticationEntryPoint aep = (AuthenticationEntryPoint)
                    request.getAttribute(GeoServerSecurityFilter.AUTHENTICATION_ENTRY_POINT_HEADER);
            if (aep!=null// remove from request
                request.removeAttribute(AUTHENTICATION_ENTRY_POINT_HEADER);

            // entry point specified ?
            if (getEntryEntryPoint()!=null) {
                getEntryEntryPoint().commence(request, response, authException);
                return;
            }
           
            // entry point from request ?
            if (aep!=null) {
                aep.commence(request, response, authException);
                return;
            }

            // 403, FORBIDDEN
            defaultEntryPoint.commence(request, response, authException);   
View Full Code Here

TOP

Related Classes of org.springframework.security.web.AuthenticationEntryPoint

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.