I am trying to manage my user via cookie. It\'s not that easy because there is absolutely no documentation about this topic.
With the help of the sample \"zentask\"
There is also full stack for authentication and authorization - Play Authenticate by Joscha Feth. (available at GitHub)
It incorporates ready-to-use sample for Java, which uses concepts of securesocial + full Deadbolt 2 (by Steve Chaloner) support. it has:
register and log in users with e-mail, Google, Facebook, Foursquare, Twitter, OpenId and custom providers.roles and permissions (via Deadbolt 2)There is sample app for Java in it. You can incorporate it to your app.
As shown in the Zentask sample, your Secured class should extend Security.Authenticator.
With this, it will allow to put a @Security.Authenticated annotation either on a Controller, or on an Action. This annotation allows to redirect the client to another page if the user is not properly authorized (by overriding the Security.Authenticator.onUnauthorized() method).
The workflow is the following: