Package org.springframework.security.web.csrf

Examples of org.springframework.security.web.csrf.MissingCsrfTokenException


    public void matchesDoesNotInvokeDefault() throws Exception {
        handlers.put(InvalidCsrfTokenException.class, handler1);
        handlers.put(MissingCsrfTokenException.class, handler2);
        handler = new DelegatingAccessDeniedHandler(handlers, handler3);

        AccessDeniedException accessDeniedException = new MissingCsrfTokenException("123");
        handler.handle(request, response, accessDeniedException);

        verify(handler1,never()).handle(any(HttpServletRequest.class), any(HttpServletResponse.class), any(AccessDeniedException.class));
        verify(handler2).handle(request, response, accessDeniedException);
        verify(handler3,never()).handle(any(HttpServletRequest.class), any(HttpServletResponse.class), any(AccessDeniedException.class));
View Full Code Here

TOP

Related Classes of org.springframework.security.web.csrf.MissingCsrfTokenException

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.