SEC-1459: Generifying AuthenticationUserDetailsService. Now parameterized with <? extends Authentication>.
This commit is contained in:
@@ -104,9 +104,10 @@ public class PreAuthenticatedAuthenticationProviderTests {
|
||||
return result;
|
||||
}
|
||||
|
||||
private AuthenticationUserDetailsService getPreAuthenticatedUserDetailsService(final UserDetails aUserDetails) {
|
||||
return new AuthenticationUserDetailsService() {
|
||||
public UserDetails loadUserDetails(Authentication token) throws UsernameNotFoundException {
|
||||
private AuthenticationUserDetailsService<PreAuthenticatedAuthenticationToken>
|
||||
getPreAuthenticatedUserDetailsService(final UserDetails aUserDetails) {
|
||||
return new AuthenticationUserDetailsService<PreAuthenticatedAuthenticationToken>() {
|
||||
public UserDetails loadUserDetails(PreAuthenticatedAuthenticationToken token) throws UsernameNotFoundException {
|
||||
if (aUserDetails != null && aUserDetails.getUsername().equals(token.getName())) {
|
||||
return aUserDetails;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public class WebSphere2SpringSecurityPropagationInterceptorTests {
|
||||
}
|
||||
|
||||
/** SEC-1078 */
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void createdAuthenticationTokenIsAcceptableToPreauthProvider () throws Throwable {
|
||||
WASUsernameAndGroupsExtractor helper = mock(WASUsernameAndGroupsExtractor.class);
|
||||
|
||||
Reference in New Issue
Block a user