-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Expected Behavior
Allow custom extensions of WebAuthenticationDetails
to be deserialized by Jackson.
Current Behavior
The current public constructor on WebAuthenticationDetails
expects a HttpServletRequest
, which is not available at the time of deserialization.
Context
We use a custom extension of WebAuthenticationDetails
(e.g. ExWebAuthenticationDetails
) along with a custom AbstractUserDetailsAuthenticationProvider
to set it up. This all works great, except we are unable to deserialize ExWebAuthenticationDetails
using Jackson because the only accessible constructor expects a HttpServletRequest
.
It seems like this has been considered because WebAuthenticationDetails
has a private constructor specifically for Jackson, but we can't use it because it's private:
Line 56 in 82426e2
private WebAuthenticationDetails(final String remoteAddress, final String sessionId) { |
At the moment our options are to create a mock implementing of HttpServletRequest
that satisfies the constructor usage, or alternativaly copy the entire WebAuthenticationDetails
class into our codebase... :/
Thanks!