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>
AHttpMessageConverter
for anOAuth 2.0 Error
.- Since:
- 5.1
- See Also:
AbstractHttpMessageConverter
,OAuth2Error
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.String>,OAuth2Error>
errorConverter
protected org.springframework.core.convert.converter.Converter<OAuth2Error,java.util.Map<java.lang.String,java.lang.String>>
errorParametersConverter
-
Constructor Summary
Constructors Constructor Description OAuth2ErrorHttpMessageConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OAuth2Error
readInternal(java.lang.Class<? extends OAuth2Error> clazz, org.springframework.http.HttpInputMessage inputMessage)
void
setErrorConverter(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.String>,OAuth2Error> errorConverter)
Sets theConverter
used for converting the OAuth 2.0 Error parameters to anOAuth2Error
.void
setErrorParametersConverter(org.springframework.core.convert.converter.Converter<OAuth2Error,java.util.Map<java.lang.String,java.lang.String>> errorParametersConverter)
Sets theConverter
used for converting theOAuth2Error
to aMap
representation of the OAuth 2.0 Error parameters.protected boolean
supports(java.lang.Class<?> clazz)
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, write
-
-
-
-
Field Detail
-
errorConverter
protected org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,java.lang.String>,OAuth2Error> errorConverter
-
errorParametersConverter
protected org.springframework.core.convert.converter.Converter<OAuth2Error,java.util.Map<java.lang.String,java.lang.String>> errorParametersConverter
-
-
Method Detail
-
supports
protected boolean supports(java.lang.Class<?> clazz)
- Specified by:
supports
in classorg.springframework.http.converter.AbstractHttpMessageConverter<OAuth2Error>
-
readInternal
protected OAuth2Error readInternal(java.lang.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<java.util.Map<java.lang.String,java.lang.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,java.util.Map<java.lang.String,java.lang.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
-
-