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 with
SCOPE_
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:
-
Field Summary
Fields inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
authoritiesAttributes, defaultUserDefinitionKey, groupsAttributes, identityService, tenantAttribute, userDefinitionAuthoritiesProvider, userDefinitionGroupMappings, userDefinitionKeyAttribute
-
Constructor Summary
ConstructorDescriptionFlowableOAuth2GrantedAuthoritiesMapper
(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
addGrantedAuthoritiesFromPlatformUser, asString, asStringCollection, collectAuthority, collectGrantedAuthorities, determineUserDefinitionKeyForGroups, mapAuthorities, mapAuthorities, setIdentityService
-
Constructor Details
-
FlowableOAuth2GrantedAuthoritiesMapper
public FlowableOAuth2GrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
-
Method Details
-
mapAuthorities
public Collection<? extends GrantedAuthority> mapAuthorities(Collection<? extends GrantedAuthority> authorities) - Specified by:
mapAuthorities
in interfaceGrantedAuthoritiesMapper
-
getOAuth2UserAuthority
protected OAuth2UserAuthority getOAuth2UserAuthority(Collection<? extends GrantedAuthority> authorities)
-