Interface JwtClaimsContributor

All Known Implementing Classes:
IdpClaimsContributor, MfaClaimsContributor, TokenExchangeAudienceContributor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface JwtClaimsContributor
Extension point that lets a feature add claims to the tokens issued by the authorization server: the access tokens, whether self-contained (JWT) or reference (their claims are returned by the introspection endpoint), and the ID tokens. Every bean of this type is applied by IssuedTokenClaims, in Order order, after the built-in claims, so a later contributor may override them. A contributor that only concerns one kind of token checks OAuth2TokenContext.getTokenType().
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    contribute(org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext context, Map<String,Object> claims)
    Adds claims to the token being issued.
  • Method Details

    • contribute

      void contribute(org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext context, Map<String,Object> claims)
      Adds claims to the token being issued.
      Parameters:
      context - the token context, with the token type, the principal, the client and the grant type.
      claims - the mutable claims of the token being built.