Package org.springframework.security.web.util.matcher

Examples of org.springframework.security.web.util.matcher.RequestMatcher.matches()


    @Test
    public void testDefaultEntryPoint() throws Exception {
        AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
        RequestMatcher firstRM = mock(RequestMatcher.class);
        when(firstRM.matches(request)).thenReturn(false);
        entryPoints.put(firstRM, firstAEP);

        daep.commence(request, null, null);

        verify(defaultEntryPoint).commence(request, null, null);
View Full Code Here


        AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
        RequestMatcher firstRM = mock(RequestMatcher.class);
        AuthenticationEntryPoint secondAEP = mock(AuthenticationEntryPoint.class);
        RequestMatcher secondRM = mock(RequestMatcher.class);
        when(firstRM.matches(request)).thenReturn(false);
        when(secondRM.matches(request)).thenReturn(true);
        entryPoints.put(firstRM, firstAEP);
        entryPoints.put(secondRM, secondAEP);

        daep.commence(request, null, null);
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.