public class DefaultAuthoritiesMapper extends Object implements AuthoritiesMapper
AuthoritiesMapper.| Constructor and Description |
|---|
DefaultAuthoritiesMapper(Map<String,ProviderRoleMapping> providerRoleMappings,
String defaultProviderId) |
DefaultAuthoritiesMapper(String providerId,
boolean mapOAuthScopes)
Convenience constructor that will create a
DefaultAuthoritiesMapper with a
single ProviderRoleMapping. |
DefaultAuthoritiesMapper(String providerId,
boolean mapOAuthScopes,
Map<String,String> roleMappings)
Convenience constructor that will create a
DefaultAuthoritiesMapper with a
single ProviderRoleMapping. |
DefaultAuthoritiesMapper(String providerId,
ProviderRoleMapping providerRoleMapping)
Convenience constructor that will create a
DefaultAuthoritiesMapper with a
single ProviderRoleMapping. |
| Modifier and Type | Method and Description |
|---|---|
Set<org.springframework.security.core.GrantedAuthority> |
mapScopesToAuthorities(String clientIdParam,
Set<String> scopes,
String token)
|
public DefaultAuthoritiesMapper(Map<String,ProviderRoleMapping> providerRoleMappings, String defaultProviderId)
public DefaultAuthoritiesMapper(String providerId, boolean mapOAuthScopes, Map<String,String> roleMappings)
DefaultAuthoritiesMapper with a
single ProviderRoleMapping.providerId - Create a ProviderRoleMapping with the specified providerIdmapOAuthScopes - Shall OAuth scopes be considered?roleMappings - Used to populate the ProviderRoleMappingpublic DefaultAuthoritiesMapper(String providerId, boolean mapOAuthScopes)
DefaultAuthoritiesMapper with a
single ProviderRoleMapping.providerId - The provider id for the ProviderRoleMappingmapOAuthScopes - Consider scopes?public DefaultAuthoritiesMapper(String providerId, ProviderRoleMapping providerRoleMapping)
DefaultAuthoritiesMapper with a
single ProviderRoleMapping.providerId - The provider id for the ProviderRoleMappingproviderRoleMapping - The role mappings to add to the ProviderRoleMappingpublic Set<org.springframework.security.core.GrantedAuthority> mapScopesToAuthorities(String clientIdParam, Set<String> scopes, String token)
List of GrantedAuthoritys contains all roles from
CoreSecurityRoles. The roles are prefixed with the value specified in
GrantedAuthorityDefaults.mapScopesToAuthorities in interface AuthoritiesMapperclientIdParam - If null, the default defaultProviderId is usedscopes - Must not be nulltoken - Ignored in this implementationCopyright © 2020 Pivotal Software, Inc.. All rights reserved.