Class FlowableOAuth2GrantedAuthoritiesMapper
- java.lang.Object
-
- com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
-
- com.flowable.core.spring.security.oauth2.FlowableOAuth2GrantedAuthoritiesMapper
-
- All Implemented Interfaces:
GrantedAuthoritiesMapper
public class FlowableOAuth2GrantedAuthoritiesMapper extends FlowableOAuth2CommonGrantedAuthoritiesMapper implements GrantedAuthoritiesMapper
The Spring Security default implementation prefixes the authorities withSCOPE_
and uses the scopes from OAuth2 in the authorities. However, in order to support authorities from custom attributes with need custom attributes mapper.- Author:
- Filip Hrisafov
- See Also:
FlowableJwtGrantedAuthoritiesMapper
-
-
Field Summary
-
Fields inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
authoritiesAttributes, groupsAttributes, tenantAttribute, userDefinitionAuthoritiesProvider, userDefinitionKeyAttribute
-
-
Constructor Summary
Constructors Constructor Description FlowableOAuth2GrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OAuth2UserAuthority
getOAuth2UserAuthority(Collection<? extends GrantedAuthority> authorities)
Collection<? extends GrantedAuthority>
mapAuthorities(Collection<? extends GrantedAuthority> authorities)
-
Methods inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
asString, asStringCollection, collectAuthority, collectGrantedAuthorities, mapAuthorities
-
-
-
-
Constructor Detail
-
FlowableOAuth2GrantedAuthoritiesMapper
public FlowableOAuth2GrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
-
Method Detail
-
mapAuthorities
public Collection<? extends GrantedAuthority> mapAuthorities(Collection<? extends GrantedAuthority> authorities)
- Specified by:
mapAuthorities
in interfaceGrantedAuthoritiesMapper
-
getOAuth2UserAuthority
protected OAuth2UserAuthority getOAuth2UserAuthority(Collection<? extends GrantedAuthority> authorities)
-
-