Steve, the developer of Deadbolt, suggested the following to me:
the trick is to keep the user in context and then use your controller or deadbolt handler to access it. This allows you to store the user by the actual class, rather than using getSubject () and pouring the resulting object into your actual user class.
So, I decided to save the User object in args -Field Http.Context.current () , and it works like a charm!
source share