I'm a complete newbie with Play! I'm a Django developer and I started using Play! a few days ago. I can't find information on how to register new users to my application. I don't want to use OAuth, I just want to manage users in my own database with passwords encryption. By the way, I'm using Java version.
Despite most frameworks do have plugins for authentication (for instance Spring Session ), Play doesn’t offer anything like that. But to be fair, Play makes it very easy to implement. I found a few open source solutions to handle authentication on Play Framework:
This permission does not allow users to publish apps on Google Play. To create new apps, users also need to have the View app information and download bulk reports (read-only) permission. This permission is available for users with “Account” access only.
Play Console permissions are separate from any permissions managed within the Google payments center. Sign in to the Google payments center. On the left menu, select Settings . Under "Payments users," select Manage Payments Users > Add a new user.
The “Account” equivalent is Create, edit, and delete draft apps. This permission does not allow users to publish apps on Google Play. To create new apps, users also need to have the View app information and download bulk reports (read-only) permission.
There is nothing ready yet, however I'd suggest you to use play-authenticate (live demo) as a base.
That's currently the most advanced solution for Play 2 for authentication and authorization. It combines deadbolt-2 for authorization (roles and permissions) + own authentication which makes it very comfortable stack to start with.
Although its base idea is deliver a way for authenticating users with OAuth - the providers
are a configurable options, so you can disable it and base on e-mail provider only.
Note important for you it... hasn't build-in user management, however I can ensure you that in current state it requires adding just several actions to create what you need. I'm doing it in few of my projects and soon will send a pull request with that changes.
Edit: By default all providers are enabled with dummy credentials, of course it will fail to run. You need to disable them in conf/play.plugins
(by just removing unwanted lines) most probably you have to keep only these lines to keep deadbolt + PA with mailer:
1500:com.typesafe.plugin.CommonsMailerPlugin
10000:be.objectify.deadbolt.DeadboltPlugin
10005:service.PaUserServicePlugin
10040:providers.PaUsernamePasswordAuthProvider
Also don't forget to set proper SMTP credentials in conf/play-authenticate/smtp.conf
to make sure that password recovering will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With