Class AuthorizationJsonMapperFactory

java.lang.Object
com.irurueta.authserver.authorization.infrastructure.persistence.clients.AuthorizationJsonMapperFactory

@Component public class AuthorizationJsonMapperFactory extends Object
Creates the JSON mapper that serializes the attributes and token claims stored with each authorization.

It is the framework's own mapper with Long added to the allowed types, because claims such as auth_time are numeric dates that the polymorphic type validator would otherwise reject when an authorization is read back. Every AuthorizationJacksonModuleContributor bean adds its module too.

  • Field Details

  • Constructor Details

    • AuthorizationJsonMapperFactory

      public AuthorizationJsonMapperFactory()
  • Method Details

    • create

      public tools.jackson.databind.json.JsonMapper create()
      Creates the mapper. The contributed modules are created first, so each has configured the type validator before the framework's modules are created with it.
      Returns:
      a mapper with the framework's security modules and the contributed ones, and Long allowed.