This trait represents a user. Using this trait you can return your own object from the
UserService. Find methods if you need to instead of returning a SocialUser.
In your controller actions you can then convert this Identity to your own class using pattern matching in Scala
or a cast in Java.
Important: your controllers will receive the instance you created, but this won't work the same for the
UserService.save method. In that case, SecureSocial will pass an instance created by itself (a SocialUser) so
do not try to cast the Identity to your own model within your method implementation.
This trait represents a user. Using this trait you can return your own object from the UserService. Find methods if you need to instead of returning a SocialUser.
In your controller actions you can then convert this Identity to your own class using pattern matching in Scala or a cast in Java.
Important: your controllers will receive the instance you created, but this won't work the same for the UserService.save method. In that case, SecureSocial will pass an instance created by itself (a SocialUser) so do not try to cast the Identity to your own model within your method implementation.