public class FlowableOAuth2GrantedAuthoritiesMapper extends Object implements org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper
SCOPE_ and uses the scopes from OAuth2 in the authorities.
However, in order to support authorities from custom attributes with need custom attributes mapper.FlowableJwtGrantedAuthoritiesMapper| Modifier and Type | Field and Description |
|---|---|
protected String |
authoritiesAttribute |
protected Collection<org.springframework.security.core.GrantedAuthority> |
defaultAuthorities |
protected String |
groupsAttribute |
| Constructor and Description |
|---|
FlowableOAuth2GrantedAuthoritiesMapper(String authoritiesAttribute,
String groupsAttribute,
Collection<String> defaultAuthorities,
Collection<String> defaultGroups) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<String> |
asStringCollection(Object value) |
protected org.springframework.security.oauth2.core.user.OAuth2UserAuthority |
getOAuth2UserAuthority(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
Collection<? extends org.springframework.security.core.GrantedAuthority> |
mapAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
protected final String authoritiesAttribute
protected final String groupsAttribute
protected final Collection<org.springframework.security.core.GrantedAuthority> defaultAuthorities
public FlowableOAuth2GrantedAuthoritiesMapper(String authoritiesAttribute, String groupsAttribute, Collection<String> defaultAuthorities, Collection<String> defaultGroups)
public Collection<? extends org.springframework.security.core.GrantedAuthority> mapAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
mapAuthorities in interface org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapperprotected Collection<String> asStringCollection(Object value)
protected org.springframework.security.oauth2.core.user.OAuth2UserAuthority getOAuth2UserAuthority(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
Copyright © 2021 Flowable. All rights reserved.