Class AppleTokenRequestCustomizer

java.lang.Object
com.irurueta.authserver.authorization.api.web.social.AppleTokenRequestCustomizer
All Implemented Interfaces:
Consumer<org.springframework.util.MultiValueMap<String,String>>

public class AppleTokenRequestCustomizer extends Object implements Consumer<org.springframework.util.MultiValueMap<String,String>>
Customizes the parameters of the token request of the authorization code grant: the request made for Apple's client id carries the signed JWT of AppleClientSecretGenerator as its client_secret, in place of the empty secret the registration holds. Requests of other registrations are left alone. It is the parametersCustomizer of the framework's token response client, which runs after the parameters are built.
  • Field Details

    • appleClientId

      private final String appleClientId
      Client id of the Apple registration.
    • secretGenerator

      private final AppleClientSecretGenerator secretGenerator
      Generates the client secret.
  • Constructor Details

    • AppleTokenRequestCustomizer

      public AppleTokenRequestCustomizer()
  • Method Details

    • accept

      public void accept(org.springframework.util.MultiValueMap<String,String> parameters)
      Replaces the client secret of an Apple request.
      Specified by:
      accept in interface Consumer<org.springframework.util.MultiValueMap<String,String>>
      Parameters:
      parameters - the parameters of the token request.