Interface AccessTokenRequestCustomizer


  • @ConsumerType
    public interface AccessTokenRequestCustomizer
    An interface to customize the token exchange/trade mechanism for JWT Bearer based request for requesting an OAuth 2.0 access token. Implementers of this interface should use this to customize the parameters to be sent in the request for exchanging the JWT for access token if the api they use specifies non-standard parameters as opposed to the ones specified in RFC 7523.
    Since:
    3.6
    See Also:
    AccessTokenProvider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CUSTOMIZER_TYPE_PROPERTY
      Specifies the property name of this customizer type
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getRequestHeaders​(java.util.Map<java.lang.String,​java.lang.Object> requestContext)
      Customizes the request headers for trading JWT for an access token
      java.util.Map<java.lang.String,​java.lang.String> getRequestParameters​(java.util.Map<java.lang.String,​java.lang.Object> requestContext)
      Customizes the request parameters for trading JWT for an access token
    • Field Detail

      • CUSTOMIZER_TYPE_PROPERTY

        static final java.lang.String CUSTOMIZER_TYPE_PROPERTY
        Specifies the property name of this customizer type
        See Also:
        Constant Field Values
    • Method Detail

      • getRequestParameters

        java.util.Map<java.lang.String,​java.lang.String> getRequestParameters​(java.util.Map<java.lang.String,​java.lang.Object> requestContext)
        Customizes the request parameters for trading JWT for an access token
        Parameters:
        requestContext - The request context contains values or null for context keys referenced in AccessTokenProviderConstants
        Returns:
        The customized parameters for requesting access token in exchange for a JWT. If there is no customization done, the passed request parameters are returned without any changes.
        See Also:
        AccessTokenProviderConstants
      • getRequestHeaders

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getRequestHeaders​(java.util.Map<java.lang.String,​java.lang.Object> requestContext)
        Customizes the request headers for trading JWT for an access token
        Parameters:
        requestContext - The request context contains values or null for context keys referenced in AccessTokenProviderConstants
        Returns:
        The customized headers for requesting access token in exchange for a JWT. If there is no customization done, the passed headers are returned without any changes.
        See Also:
        AccessTokenProviderConstants