java.lang.Object |
↳ |
org.springframework.security.core.authority.mapping.MapBasedAttributes2GrantedAuthoritiesMapper |
Class Overview
This class implements the Attributes2GrantedAuthoritiesMapper and
MappableAttributesRetriever interfaces based on the supplied Map.
It supports both one-to-one and one-to-many mappings. The granted
authorities to map to can be supplied either as a String or as a
GrantedAuthority object.
Public Constructors
public
MapBasedAttributes2GrantedAuthoritiesMapper
()
Public Methods
public
void
afterPropertiesSet
()
Returns
- Returns the attributes2grantedAuthoritiesMap.
Map the given array of attributes to Spring Security GrantedAuthorities.
Parameters
attributes
| the attributes to be mapped |
Returns
- the collection of authorities created from the attributes
public
Set<String>
getMappableAttributes
()
Implementations of this method should return a set of all string attributes which
can be mapped to GrantedAuthoritys.
Returns
- set of all mappable roles
public
String
getStringSeparator
()
Returns
- Returns the stringSeparator.
public
void
setAttributes2grantedAuthoritiesMap
(Map<?, ?> attributes2grantedAuthoritiesMap)
Parameters
attributes2grantedAuthoritiesMap
| The attributes2grantedAuthoritiesMap to set.
|
public
void
setStringSeparator
(String stringSeparator)
Parameters
stringSeparator
| The stringSeparator to set.
|