Closed
Description
When using spring-session-mongo I've using spring security and a UserDetails Service which should be persisted into the session.
I'm currently getting multiple problems when trying to deserialize the session.
java.util.LinkedHashMap cannot be cast to org.springframework.security.web.savedrequest.SavedRequest
caused by
HttpSessionRequestCache
on line 71, where it tries to cast the deserialized map into a SavedRequest
I've written a couple of test where you can try it out.
https://github.com/leon/spring-session/blob/mongo-cannot-handle-saved-request/spring-session/src/test/java/org/springframework/session/data/mongo/JacksonMongoSessionConverterTest.java#L92
I then have the same problem with the UserDetails class which gets serialized as the principal.
Am I doing something wrong, or is this a bug / feature that is missing?