Class OAuth2PasswordGrantRequestEntityConverter

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<OAuth2PasswordGrantRequest,​org.springframework.http.RequestEntity<?>>

    public class OAuth2PasswordGrantRequestEntityConverter
    extends java.lang.Object
    An implementation of an AbstractOAuth2AuthorizationGrantRequestEntityConverter that converts the provided OAuth2PasswordGrantRequest to a RequestEntity representation of an OAuth 2.0 Access Token Request for the Resource Owner Password Credentials Grant.
    Since:
    5.2
    See Also:
    AbstractOAuth2AuthorizationGrantRequestEntityConverter, OAuth2PasswordGrantRequest, RequestEntity
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeadersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.http.HttpHeaders> headersConverter)
      Add (compose) the provided headersConverter to the current Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a HttpHeaders used in the OAuth 2.0 Access Token Request headers.
      void addParametersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String>> parametersConverter)
      Add (compose) the provided parametersConverter to the current Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a MultiValueMap of the parameters used in the OAuth 2.0 Access Token Request body.
      org.springframework.http.RequestEntity<?> convert​(T authorizationGrantRequest)  
      protected org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> createParameters​(OAuth2PasswordGrantRequest passwordGrantRequest)  
      void setHeadersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.http.HttpHeaders> headersConverter)
      Sets the Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a HttpHeaders used in the OAuth 2.0 Access Token Request headers.
      void setParametersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String>> parametersConverter)
      Sets the Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a MultiValueMap of the parameters used in the OAuth 2.0 Access Token Request body.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.core.convert.converter.Converter

        andThen
    • Constructor Detail

      • OAuth2PasswordGrantRequestEntityConverter

        public OAuth2PasswordGrantRequestEntityConverter()
    • Method Detail

      • createParameters

        protected org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> createParameters​(OAuth2PasswordGrantRequest passwordGrantRequest)
      • convert

        public org.springframework.http.RequestEntity<?> convert​(T authorizationGrantRequest)
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<T extends AbstractOAuth2AuthorizationGrantRequest,​org.springframework.http.RequestEntity<?>>
      • setHeadersConverter

        public final void setHeadersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.http.HttpHeaders> headersConverter)
        Sets the Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a HttpHeaders used in the OAuth 2.0 Access Token Request headers.
        Parameters:
        headersConverter - the Converter used for converting the OAuth2AuthorizationCodeGrantRequest to HttpHeaders
      • addHeadersConverter

        public final void addHeadersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.http.HttpHeaders> headersConverter)
        Add (compose) the provided headersConverter to the current Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a HttpHeaders used in the OAuth 2.0 Access Token Request headers.
        Parameters:
        headersConverter - the Converter to add (compose) to the current Converter used for converting the OAuth2AuthorizationCodeGrantRequest to a HttpHeaders
      • setParametersConverter

        public final void setParametersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String>> parametersConverter)
        Sets the Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a MultiValueMap of the parameters used in the OAuth 2.0 Access Token Request body.
        Parameters:
        parametersConverter - the Converter used for converting the OAuth2AuthorizationCodeGrantRequest to a MultiValueMap of the parameters
      • addParametersConverter

        public final void addParametersConverter​(org.springframework.core.convert.converter.Converter<T,​org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String>> parametersConverter)
        Add (compose) the provided parametersConverter to the current Converter used for converting the AbstractOAuth2AuthorizationGrantRequest instance to a MultiValueMap of the parameters used in the OAuth 2.0 Access Token Request body.
        Parameters:
        parametersConverter - the Converter to add (compose) to the current Converter used for converting the OAuth2AuthorizationCodeGrantRequest to a MultiValueMap of the parameters