Class ExpressionJwtGrantedAuthoritiesConverter

java.lang.Object
org.springframework.security.oauth2.server.resource.authentication.ExpressionJwtGrantedAuthoritiesConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<Jwt,Collection<GrantedAuthority>>

public final class ExpressionJwtGrantedAuthoritiesConverter extends Object implements org.springframework.core.convert.converter.Converter<Jwt,Collection<GrantedAuthority>>
Uses an expression for extracting the token claim value to use for mapping authorities. Note this can be used in combination with a DelegatingJwtGrantedAuthoritiesConverter.
Since:
6.4
  • Constructor Details

    • ExpressionJwtGrantedAuthoritiesConverter

      public ExpressionJwtGrantedAuthoritiesConverter(org.springframework.expression.Expression authoritiesClaimExpression)
      Constructs a ExpressionJwtGrantedAuthoritiesConverter using the provided authoritiesClaimExpression.
      Parameters:
      authoritiesClaimExpression - The token claim SpEL Expression to map authorities from.
  • Method Details