Class AuthResponseTypeDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType>
com.alpaca.security.oauth2.AuthResponseTypeDeserializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider

public class AuthResponseTypeDeserializer extends com.fasterxml.jackson.databind.JsonDeserializer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType>
Custom Jackson deserializer for OAuth2 authorization response type values.

Spring Security's OAuth2AuthorizationResponseType represents the OAuth2 response_type parameter, such as "code". Since JSON may contain this value in lowercase, this deserializer ensures correct construction of the enum-like object by normalizing the input to uppercase before instantiation using the string constructor.

By extending JsonDeserializer, this class can be registered with Jackson’s ObjectMapper, allowing Spring Boot to use it automatically when deserializing OAuth2 response types from JSON.

See Also:
  • OAuth2AuthorizationResponseType
  • JsonDeserializer
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType
    deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ct)
     

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AuthResponseTypeDeserializer

      public AuthResponseTypeDeserializer()
  • Method Details

    • deserialize

      public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ct) throws IOException
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationResponseType>
      Throws:
      IOException