public final class GrantedAuthorityFromAssertionAttributesUserDetailsService extends AbstractCasAssertionUserDetailsService
GrantedAuthority
s for a user by reading a list of attributes that were returned as
part of the CAS response. Each attribute is read and each value of the attribute is turned into a GrantedAuthority. If the attribute has no
value then its not added.Constructor and Description |
---|
GrantedAuthorityFromAssertionAttributesUserDetailsService(String[] attributes) |
Modifier and Type | Method and Description |
---|---|
protected UserDetails |
loadUserDetails(org.jasig.cas.client.validation.Assertion assertion)
Protected template method for construct a
UserDetails via the supplied CAS
assertion. |
void |
setConvertToUpperCase(boolean convertToUpperCase)
Converts the returned attribute values to uppercase values.
|
loadUserDetails
public GrantedAuthorityFromAssertionAttributesUserDetailsService(String[] attributes)
protected UserDetails loadUserDetails(org.jasig.cas.client.validation.Assertion assertion)
AbstractCasAssertionUserDetailsService
UserDetails
via the supplied CAS
assertion.loadUserDetails
in class AbstractCasAssertionUserDetailsService
assertion
- the assertion to use to construct the new UserDetails. CANNOT be NULL.public void setConvertToUpperCase(boolean convertToUpperCase)
convertToUpperCase
- true if it should convert, false otherwise.