public class FlowableJwtGrantedAuthoritiesMapper extends Object implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,Collection<org.springframework.security.core.GrantedAuthority>>
SCOPE_ and uses the scopes from OAuth2 in the authorities.
However, in order to support authorities from custom attributes with need custom attributes mapper.FlowableOAuth2GrantedAuthoritiesMapper| Modifier and Type | Field and Description |
|---|---|
protected String |
authoritiesAttribute |
protected Collection<org.springframework.security.core.GrantedAuthority> |
defaultAuthorities |
protected org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter |
defaultConverter |
protected String |
groupsAttribute |
| Constructor and Description |
|---|
FlowableJwtGrantedAuthoritiesMapper(String authoritiesAttribute,
String groupsAttribute,
Collection<String> defaultAuthorities,
Collection<String> defaultGroups) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<String> |
asStringCollection(Object value) |
Collection<org.springframework.security.core.GrantedAuthority> |
convert(org.springframework.security.oauth2.jwt.Jwt jwt) |
void |
setDefaultConverter(org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter defaultConverter) |
protected final String authoritiesAttribute
protected final String groupsAttribute
protected final Collection<org.springframework.security.core.GrantedAuthority> defaultAuthorities
protected org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter defaultConverter
public FlowableJwtGrantedAuthoritiesMapper(String authoritiesAttribute, String groupsAttribute, Collection<String> defaultAuthorities, Collection<String> defaultGroups)
public Collection<org.springframework.security.core.GrantedAuthority> convert(org.springframework.security.oauth2.jwt.Jwt jwt)
convert in interface org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,Collection<org.springframework.security.core.GrantedAuthority>>protected Collection<String> asStringCollection(Object value)
public void setDefaultConverter(org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter defaultConverter)
Copyright © 2022 Flowable. All rights reserved.