Class FlowableJwtGrantedAuthoritiesMapper
java.lang.Object
com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
com.flowable.core.spring.security.oauth2.FlowableJwtGrantedAuthoritiesMapper
- All Implemented Interfaces:
Converter<Jwt,
Collection<GrantedAuthority>>
public class FlowableJwtGrantedAuthoritiesMapper
extends FlowableOAuth2CommonGrantedAuthoritiesMapper
implements Converter<Jwt,Collection<GrantedAuthority>>
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
Modifier and TypeFieldDescriptionprotected Converter<Jwt,
Collection<GrantedAuthority>> protected String
Fields inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
authoritiesAttributes, defaultUserDefinitionKey, groupsAttributes, identityService, tenantAttribute, userDefinitionAuthoritiesProvider, userDefinitionGroupMappings, userDefinitionKeyAttribute
-
Constructor Summary
ConstructorDescriptionFlowableJwtGrantedAuthoritiesMapper
(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDefaultConverter
(Converter<Jwt, Collection<GrantedAuthority>> defaultConverter) void
setPrincipalClaimName
(String principalClaimName) Methods inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
addGrantedAuthoritiesFromPlatformUser, asString, asStringCollection, collectAuthority, collectGrantedAuthorities, determineUserDefinitionKeyForGroups, mapAuthorities, mapAuthorities, setIdentityService
-
Field Details
-
defaultConverter
-
principalClaimName
-
-
Constructor Details
-
FlowableJwtGrantedAuthoritiesMapper
public FlowableJwtGrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
-
Method Details
-
convert
- Specified by:
convert
in interfaceConverter<Jwt,
Collection<GrantedAuthority>>
-
setDefaultConverter
-
setPrincipalClaimName
-