I am currently working on authentication with play 2.x and securesocial plugin with scala.
My website should always have user info like "Username" "avatar image" etc in the header all the times unless user logout.
Now using secure social I am trying to get the current user of the request and made it implicit so that I can get the value for all the requests and avoid passing it as params to the template.
implicit def user(implicit request: RequestHeader) = SecureSocial.currentUser;
But the securesocial.core.SecureSocial requires a implicit request which I can't uness I have Action {} in my controller. Using implicit is very convenient but i find securesocial stuff kind of confusing.
The request object you receive in SecuredActions has a user already: request.user will give you the current one. If you pass this instance to your views you will have the user available. See SecuredRequest in SecureSocial.scala.