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:
-
AbstractHttpMessageConverter
OAuth2Error
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.core.convert.converter.Converter<Map<String,
String>, OAuth2Error> protected org.springframework.core.convert.converter.Converter<OAuth2Error,
Map<String, String>> Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected OAuth2Error
readInternal
(Class<? extends OAuth2Error> clazz, org.springframework.http.HttpInputMessage inputMessage) final void
setErrorConverter
(org.springframework.core.convert.converter.Converter<Map<String, String>, OAuth2Error> errorConverter) Sets theConverter
used for converting the OAuth 2.0 Error parameters to anOAuth2Error
.final void
setErrorParametersConverter
(org.springframework.core.convert.converter.Converter<OAuth2Error, Map<String, String>> errorParametersConverter) Sets theConverter
used for converting theOAuth2Error
to aMap
representation of the OAuth 2.0 Error parameters.protected boolean
protected void
writeInternal
(OAuth2Error oauth2Error, org.springframework.http.HttpOutputMessage outputMessage) Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, supportsRepeatableWrites, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
Field Details
-
errorConverter
protected org.springframework.core.convert.converter.Converter<Map<String,String>, errorConverterOAuth2Error> -
errorParametersConverter
protected org.springframework.core.convert.converter.Converter<OAuth2Error,Map<String, errorParametersConverterString>>
-
-
Constructor Details
-
OAuth2ErrorHttpMessageConverter
public OAuth2ErrorHttpMessageConverter()
-
-
Method Details
-
supports
- Specified by:
supports
in classorg.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 classorg.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 classorg.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 theConverter
used for converting the OAuth 2.0 Error parameters to anOAuth2Error
.- Parameters:
errorConverter
- theConverter
used for converting to anOAuth2Error
-
setErrorParametersConverter
public final void setErrorParametersConverter(org.springframework.core.convert.converter.Converter<OAuth2Error, Map<String, String>> errorParametersConverter) Sets theConverter
used for converting theOAuth2Error
to aMap
representation of the OAuth 2.0 Error parameters.- Parameters:
errorParametersConverter
- theConverter
used for converting to aMap
representation of the Error parameters
-