Class AADJwtGrantedAuthoritiesConverter

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

    public class AADJwtGrantedAuthoritiesConverter
    extends Object
    implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​Collection<org.springframework.security.core.GrantedAuthority>>
    Extracts the GrantedAuthoritys from scope attributes typically found in a Jwt.
    • Constructor Detail

      • AADJwtGrantedAuthoritiesConverter

        public AADJwtGrantedAuthoritiesConverter​(Map<String,​String> claimToAuthorityPrefixMap)
        Creates a new instance of AADJwtGrantedAuthoritiesConverter.
        Parameters:
        claimToAuthorityPrefixMap - the claim to authority prefix map
    • 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>>