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:
-
AbstractHttpMessageConverterOAuth2Error
-
Field Summary
FieldsModifier 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OAuth2ErrorreadInternal(Class<? extends OAuth2Error> clazz, org.springframework.http.HttpInputMessage inputMessage) final voidsetErrorConverter(org.springframework.core.convert.converter.Converter<Map<String, String>, OAuth2Error> errorConverter) Sets theConverterused for converting the OAuth 2.0 Error parameters to anOAuth2Error.final voidsetErrorParametersConverter(org.springframework.core.convert.converter.Converter<OAuth2Error, Map<String, String>> errorParametersConverter) Sets theConverterused for converting theOAuth2Errorto aMaprepresentation of the OAuth 2.0 Error parameters.protected booleanprotected voidwriteInternal(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, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
supportsin 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:
readInternalin 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:
writeInternalin 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 theConverterused for converting the OAuth 2.0 Error parameters to anOAuth2Error.- Parameters:
errorConverter- theConverterused for converting to anOAuth2Error
-
setErrorParametersConverter
public final void setErrorParametersConverter(org.springframework.core.convert.converter.Converter<OAuth2Error, Map<String, String>> errorParametersConverter) Sets theConverterused for converting theOAuth2Errorto aMaprepresentation of the OAuth 2.0 Error parameters.- Parameters:
errorParametersConverter- theConverterused for converting to aMaprepresentation of the Error parameters
-