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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 the Converter used for converting the UserInfo parameters to an OidcUserInfo.
    final void
    setUserInfoParametersConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.core.oidc.OidcUserInfo,Map<String,Object>> userInfoParametersConverter)
    Sets the Converter used for converting the OidcUserInfo to a Map representation of the UserInfo.
    protected boolean
    supports(Class<?> clazz)
     
    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

      protected boolean supports(Class<?> clazz)
      Specified by:
      supports in class org.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 class org.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 class org.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 the Converter used for converting the UserInfo parameters to an OidcUserInfo.
      Parameters:
      userInfoConverter - the Converter used for converting to an OidcUserInfo
    • setUserInfoParametersConverter

      public final void setUserInfoParametersConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.core.oidc.OidcUserInfo,Map<String,Object>> userInfoParametersConverter)
      Sets the Converter used for converting the OidcUserInfo to a Map representation of the UserInfo.
      Parameters:
      userInfoParametersConverter - the Converter used for converting to a Map representation of the UserInfo