mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-14 14:23:30 +00:00
SEC-1228
added NO_PASSWORD instead of passing in NULL since the User object does not allowe NULL for the password.
This commit is contained in:
parent
585311aa4a
commit
46ef4239ca
@ -35,6 +35,8 @@ import java.util.ArrayList;
|
|||||||
*/
|
*/
|
||||||
public final class GrantedAuthorityFromAssertionAttributesUserDetailsService extends AbstractCasAssertionUserDetailsService {
|
public final class GrantedAuthorityFromAssertionAttributesUserDetailsService extends AbstractCasAssertionUserDetailsService {
|
||||||
|
|
||||||
|
private static final String NON_EXISTENT_PASSWORD_VALUE = "NO_PASSWORD";
|
||||||
|
|
||||||
private String[] attributes;
|
private String[] attributes;
|
||||||
|
|
||||||
private boolean convertToUpperCase = true;
|
private boolean convertToUpperCase = true;
|
||||||
@ -70,7 +72,7 @@ public final class GrantedAuthorityFromAssertionAttributesUserDetailsService ext
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new User(assertion.getPrincipal().getName(), null, true, true, true, true, grantedAuthorities);
|
return new User(assertion.getPrincipal().getName(), NON_EXISTENT_PASSWORD_VALUE, true, true, true, true, grantedAuthorities);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user