Class FlowableJwtGrantedAuthoritiesMapper

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​Collection<org.springframework.security.core.GrantedAuthority>>

    public class FlowableJwtGrantedAuthoritiesMapper
    extends Object
    implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​Collection<org.springframework.security.core.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:
    FlowableOAuth2GrantedAuthoritiesMapper
    • Field Detail

      • authoritiesAttribute

        protected final String authoritiesAttribute
      • groupsAttribute

        protected final String groupsAttribute
      • defaultAuthorities

        protected final Collection<org.springframework.security.core.GrantedAuthority> defaultAuthorities
      • defaultConverter

        protected org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter defaultConverter
    • Constructor Detail

    • Method Detail

      • convert

        public Collection<org.springframework.security.core.GrantedAuthority> convert​(org.springframework.security.oauth2.jwt.Jwt jwt)
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​Collection<org.springframework.security.core.GrantedAuthority>>
      • setDefaultConverter

        public void setDefaultConverter​(org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter defaultConverter)