Package org.springframework.security.core.userdetails

Examples of org.springframework.security.core.userdetails.AuthenticationUserDetailsService


        });
        interceptor.setAuthenticationDetailsSource(mock(AuthenticationDetailsSource.class));
        interceptor.invoke(mock(MethodInvocation.class));

        PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider();
        AuthenticationUserDetailsService uds = mock(AuthenticationUserDetailsService.class);
        UserDetails user = mock(UserDetails.class);
        List authorities = AuthorityUtils.createAuthorityList("SOME_ROLE");
        when(user.getAuthorities()).thenReturn(authorities);
        when(uds.loadUserDetails(any(Authentication.class))).thenReturn(user);
        provider.setPreAuthenticatedUserDetailsService(uds);
        provider.setUserDetailsChecker(mock(UserDetailsChecker.class));

        assertNotNull(provider.authenticate(context.getAuthentication()));
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.core.userdetails.AuthenticationUserDetailsService

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.