Relative Content

Tag Archive for javaspringspring-securityjacksonjackson-modules

Problem with deserializing Spring Security classes

I’m trying to snapshot an Authentication instance. (This is for a Quartz scheduled job.) As per documentation, I’m registering the SecurityJackson2Modules into my object mapper. This works fine for both serialization and deserialization if I use a vanilla ObjectMapper. If I use the Spring autoconfigured one, however, I get an exception upon deserialization from the PreAuthenticatedAuthenticationToken class, namely at this object: