Package org.springframework.security.web.authentication.session

Examples of org.springframework.security.web.authentication.session.SessionAuthenticationException


        filter.setSessionAuthenticationStrategy(strategy);
        HttpServletRequest request = new MockHttpServletRequest();
        HttpServletResponse response = new MockHttpServletResponse();
        FilterChain fc = mock(FilterChain.class);
        authenticateUser();
        SessionAuthenticationException exception = new SessionAuthenticationException("Failure");
        doThrow(exception).when(strategy).onAuthentication(
                SecurityContextHolder.getContext().getAuthentication(), request, response);

        filter.doFilter(request,response, fc);
        verifyZeroInteractions(fc);
View Full Code Here


            if (e.getCause() instanceof ServiceException) {
                HttpServletRequest baseHttpRequest = (HttpServletRequest) baseRequest;
                //if authentication is null and CSRF token is invalid, must be session time out
                if (SecurityContextHolder.getContext().getAuthentication() == null) {
                    baseHttpRequest.setAttribute("sessionTimeout", true);
                    failureHandler.onAuthenticationFailure((HttpServletRequest) baseRequest, (HttpServletResponse) baseResponse, new SessionAuthenticationException("Session Time Out"));
                } else {
                    throw e;
                }
            } else {
                throw e;
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.session.SessionAuthenticationException

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.