Class AppleAuthorizationRequestCustomizer

java.lang.Object
com.irurueta.authserver.authorization.api.web.social.AppleAuthorizationRequestCustomizer
All Implemented Interfaces:
Consumer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder>

public class AppleAuthorizationRequestCustomizer extends Object implements Consumer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder>
Customizes the authorization request: Apple only hands over the name and the e-mail address of the user when the response is posted to the redirect URI (response_mode=form_post), so the request made for Apple's client id asks for it. Requests of other registrations are left alone.
  • Field Details

    • RESPONSE_MODE

      static final String RESPONSE_MODE
      Parameter that tells the provider how to return the response.
      See Also:
    • FORM_POST

      static final String FORM_POST
      Value of RESPONSE_MODE that makes the provider post the response to the redirect URI.
      See Also:
    • appleClientId

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

    • AppleAuthorizationRequestCustomizer

      public AppleAuthorizationRequestCustomizer()
  • Method Details

    • accept

      public void accept(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder builder)
      Adds the response mode to an Apple request.
      Specified by:
      accept in interface Consumer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder>
      Parameters:
      builder - builder of the authorization request.