Skip to content

Commit

Permalink
Pre-security cleanup: use full package name to avoid collision with h…
Browse files Browse the repository at this point in the history
…udson.model.User
  • Loading branch information
jsoref committed Apr 9, 2019
1 parent d636d1e commit c14a0ed
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
import org.acegisecurity.userdetails.User;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UsernameNotFoundException;
import static org.junit.Assert.*;
Expand Down Expand Up @@ -73,7 +72,7 @@ private static class InvalidUserWhenLoggingBackInRealm extends AbstractPasswordB
@Override
protected UserDetails authenticate(String username, String password) throws AuthenticationException {
if (username.equals(password)) {
return new User(username, password, true, new GrantedAuthority[] {new GrantedAuthorityImpl("myteam")});
return new org.acegisecurity.userdetails.User(username, password, true, new GrantedAuthority[] {new GrantedAuthorityImpl("myteam")});
}
throw new BadCredentialsException(username);
}
Expand Down

0 comments on commit c14a0ed

Please sign in to comment.