Class RolesTenantAudienceTokenCustomizer

java.lang.Object
com.irurueta.authserver.authorization.api.web.tokens.RolesTenantAudienceTokenCustomizer
All Implemented Interfaces:
org.springframework.security.oauth2.server.authorization.token.OAuth2TokenCustomizer<org.springframework.security.oauth2.server.authorization.token.JwtEncodingContext>

@Component public class RolesTenantAudienceTokenCustomizer extends Object implements org.springframework.security.oauth2.server.authorization.token.OAuth2TokenCustomizer<org.springframework.security.oauth2.server.authorization.token.JwtEncodingContext>
Adds the claims of IssuedTokenClaims to the self-contained tokens (JWT access tokens and ID tokens): the roles, tenant and aud claims of an access token, then the claims of every JwtClaimsContributor, which also reach the ID tokens. It is the one OAuth2TokenCustomizer<JwtEncodingContext> of the server.
  • Field Details

    • issuedTokenClaims

      private final IssuedTokenClaims issuedTokenClaims
      The claims every issued token gets.
  • Constructor Details

    • RolesTenantAudienceTokenCustomizer

      public RolesTenantAudienceTokenCustomizer()
  • Method Details

    • customize

      public void customize(org.springframework.security.oauth2.server.authorization.token.JwtEncodingContext context)
      Specified by:
      customize in interface org.springframework.security.oauth2.server.authorization.token.OAuth2TokenCustomizer<org.springframework.security.oauth2.server.authorization.token.JwtEncodingContext>