Class OAuth2ErrorHttpMessageConverter

java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
org.springframework.security.oauth2.core.http.converter.OAuth2ErrorHttpMessageConverter
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<OAuth2Error>

public class OAuth2ErrorHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
A HttpMessageConverter for an OAuth 2.0 Error.
Since:
5.1
See Also:
  • Field Details

    • errorConverter

      protected org.springframework.core.convert.converter.Converter<Map<String,String>,OAuth2Error> errorConverter
    • errorParametersConverter

      protected org.springframework.core.convert.converter.Converter<OAuth2Error,Map<String,String>> errorParametersConverter
  • Constructor Details

    • OAuth2ErrorHttpMessageConverter

      public OAuth2ErrorHttpMessageConverter()
  • Method Details

    • supports

      protected boolean supports(Class<?> clazz)
      Specified by:
      supports in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
    • readInternal

      protected OAuth2Error readInternal(Class<? extends OAuth2Error> clazz, org.springframework.http.HttpInputMessage inputMessage) throws org.springframework.http.converter.HttpMessageNotReadableException
      Specified by:
      readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
      Throws:
      org.springframework.http.converter.HttpMessageNotReadableException
    • writeInternal

      protected void writeInternal(OAuth2Error oauth2Error, org.springframework.http.HttpOutputMessage outputMessage) throws org.springframework.http.converter.HttpMessageNotWritableException
      Specified by:
      writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
      Throws:
      org.springframework.http.converter.HttpMessageNotWritableException
    • setErrorConverter

      public final void setErrorConverter(org.springframework.core.convert.converter.Converter<Map<String,String>,OAuth2Error> errorConverter)
      Sets the Converter used for converting the OAuth 2.0 Error parameters to an OAuth2Error.
      Parameters:
      errorConverter - the Converter used for converting to an OAuth2Error
    • setErrorParametersConverter

      public final void setErrorParametersConverter(org.springframework.core.convert.converter.Converter<OAuth2Error,Map<String,String>> errorParametersConverter)
      Sets the Converter used for converting the OAuth2Error to a Map representation of the OAuth 2.0 Error parameters.
      Parameters:
      errorParametersConverter - the Converter used for converting to a Map representation of the Error parameters