|
Spring Security Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper
public class SimpleAttributes2GrantedAuthoritiesMapper
This class implements the Attributes2GrantedAuthoritiesMapper interface by doing a one-to-one mapping from roles to Spring Security GrantedAuthorities. Optionally a prefix can be added, and the attribute name can be converted to upper or lower case.
By default, the attribute is prefixed with "ROLE_" unless it already starts with "ROLE_", and no case conversion is done.
| Constructor Summary | |
|---|---|
SimpleAttributes2GrantedAuthoritiesMapper()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Check whether all properties have been set to correct values. |
GrantedAuthority[] |
getGrantedAuthorities(String[] attributes)
Map the given list of string attributes one-to-one to Spring Security GrantedAuthorities. |
void |
setAddPrefixIfAlreadyExisting(boolean b)
|
void |
setAttributePrefix(String string)
|
void |
setConvertAttributeToLowerCase(boolean b)
|
void |
setConvertAttributeToUpperCase(boolean b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleAttributes2GrantedAuthoritiesMapper()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic GrantedAuthority[] getGrantedAuthorities(String[] attributes)
getGrantedAuthorities in interface Attributes2GrantedAuthoritiesMapperpublic void setConvertAttributeToLowerCase(boolean b)
public void setConvertAttributeToUpperCase(boolean b)
public void setAttributePrefix(String string)
public void setAddPrefixIfAlreadyExisting(boolean b)
|
Spring Security Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||