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 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:
FlowableOAuth2GrantedAuthoritiesMapper
-
-
Field Summary
Fields Modifier and Type Field Description protected Converter<Jwt,Collection<GrantedAuthority>>
defaultConverter
-
Fields inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
authoritiesAttributes, groupsAttributes, tenantAttribute, userDefinitionAuthoritiesProvider, userDefinitionKeyAttribute
-
-
Constructor Summary
Constructors Constructor Description FlowableJwtGrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<GrantedAuthority>
convert(Jwt jwt)
void
setDefaultConverter(Converter<Jwt,Collection<GrantedAuthority>> defaultConverter)
-
Methods inherited from class com.flowable.core.spring.security.oauth2.FlowableOAuth2CommonGrantedAuthoritiesMapper
asString, asStringCollection, collectAuthority, collectGrantedAuthorities, mapAuthorities
-
-
-
-
Field Detail
-
defaultConverter
protected Converter<Jwt,Collection<GrantedAuthority>> defaultConverter
-
-
Constructor Detail
-
FlowableJwtGrantedAuthoritiesMapper
public FlowableJwtGrantedAuthoritiesMapper(OAuth2MapperProperties properties, UserDefinitionAuthoritiesProvider userDefinitionAuthoritiesProvider)
-
-
Method Detail
-
convert
public Collection<GrantedAuthority> convert(Jwt jwt)
- Specified by:
convert
in interfaceConverter<Jwt,Collection<GrantedAuthority>>
-
setDefaultConverter
public void setDefaultConverter(Converter<Jwt,Collection<GrantedAuthority>> defaultConverter)
-
-