public class DefaultAuthoritiesExtractor extends Object implements org.springframework.boot.autoconfigure.security.oauth2.resource.AuthoritiesExtractor
AuthoritiesExtractor. Will assign ALL
CoreSecurityRoles to the authenticated OAuth2 user.| Constructor and Description |
|---|
DefaultAuthoritiesExtractor() |
DefaultAuthoritiesExtractor(boolean mapOauthScopesToAuthorities,
Map<String,String> roleMappings,
org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate) |
| Modifier and Type | Method and Description |
|---|---|
List<org.springframework.security.core.GrantedAuthority> |
extractAuthorities(Map<String,Object> map)
|
void |
setRolePrefix(String rolePrefix)
Sets the prefix which should be added to the authority name (if it doesn't already
exist)
|
public DefaultAuthoritiesExtractor(boolean mapOauthScopesToAuthorities,
Map<String,String> roleMappings,
org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate)
public DefaultAuthoritiesExtractor()
public List<org.springframework.security.core.GrantedAuthority> extractAuthorities(Map<String,Object> map)
List of GrantedAuthoritys contains all roles from
CoreSecurityRoles. The roles are prefixed with the value specified in
GrantedAuthorityDefaults.extractAuthorities in interface org.springframework.boot.autoconfigure.security.oauth2.resource.AuthoritiesExtractormap - Must not be null. Is only used for loggingpublic void setRolePrefix(String rolePrefix)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.