Class OidcUserInfoHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
org.springframework.security.oauth2.server.authorization.oidc.http.converter.OidcUserInfoHttpMessageConverter
- All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
public class OidcUserInfoHttpMessageConverter
extends org.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
A
HttpMessageConverter
for an OpenID Connect UserInfo Response
.- Since:
- 0.2.1
- See Also:
-
AbstractHttpMessageConverter
OidcUserInfo
-
Field Summary
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.oauth2.core.oidc.OidcUserInfo
readInternal
(Class<? extends org.springframework.security.oauth2.core.oidc.OidcUserInfo> clazz, org.springframework.http.HttpInputMessage inputMessage) final void
setUserInfoConverter
(org.springframework.core.convert.converter.Converter<Map<String, Object>, org.springframework.security.oauth2.core.oidc.OidcUserInfo> userInfoConverter) Sets theConverter
used for converting the UserInfo parameters to anOidcUserInfo
.final void
setUserInfoParametersConverter
(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.core.oidc.OidcUserInfo, Map<String, Object>> userInfoParametersConverter) Sets theConverter
used for converting theOidcUserInfo
to aMap
representation of the UserInfo.protected boolean
protected void
writeInternal
(org.springframework.security.oauth2.core.oidc.OidcUserInfo oidcUserInfo, 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
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
-
Constructor Details
-
OidcUserInfoHttpMessageConverter
public OidcUserInfoHttpMessageConverter()
-
-
Method Details
-
supports
- Specified by:
supports
in classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
-
readInternal
protected org.springframework.security.oauth2.core.oidc.OidcUserInfo readInternal(Class<? extends org.springframework.security.oauth2.core.oidc.OidcUserInfo> clazz, org.springframework.http.HttpInputMessage inputMessage) throws org.springframework.http.converter.HttpMessageNotReadableException - Specified by:
readInternal
in classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
- Throws:
org.springframework.http.converter.HttpMessageNotReadableException
-
writeInternal
protected void writeInternal(org.springframework.security.oauth2.core.oidc.OidcUserInfo oidcUserInfo, org.springframework.http.HttpOutputMessage outputMessage) throws org.springframework.http.converter.HttpMessageNotWritableException - Specified by:
writeInternal
in classorg.springframework.http.converter.AbstractHttpMessageConverter<org.springframework.security.oauth2.core.oidc.OidcUserInfo>
- Throws:
org.springframework.http.converter.HttpMessageNotWritableException
-
setUserInfoConverter
public final void setUserInfoConverter(org.springframework.core.convert.converter.Converter<Map<String, Object>, org.springframework.security.oauth2.core.oidc.OidcUserInfo> userInfoConverter) Sets theConverter
used for converting the UserInfo parameters to anOidcUserInfo
.- Parameters:
userInfoConverter
- theConverter
used for converting to anOidcUserInfo
-
setUserInfoParametersConverter
public final void setUserInfoParametersConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.core.oidc.OidcUserInfo, Map<String, Object>> userInfoParametersConverter) Sets theConverter
used for converting theOidcUserInfo
to aMap
representation of the UserInfo.- Parameters:
userInfoParametersConverter
- theConverter
used for converting to aMap
representation of the UserInfo
-