Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication in Play 2.3.x

Tags:

I'm using the Play! framework v2.3 (Java) and I want to add some user authentication to my web app, ie username/password for each user and a registration process.

I found some information on the docs on how to do this for v2.1 and v2.2: http://www.playframework.com/documentation/2.1.0/JavaGuide4 https://www.playframework.com/documentation/2.2.x/JavaGuide4

But I can't find any updated info on v2.3. I've already tried looking at the API for play.mvc.Security.Authenticated but it doesn't help (http://www.playframework.com/documentation/2.3.x/api/java/play/mvc/Security.Authenticated.html).

Anyone know how to do this properly?

like image 433
Danish Khan Avatar asked Jun 10 '14 12:06

Danish Khan


People also ask

What is play authenticate and how does it work?

Play! Authenticate is a brand-new choice for Java-based authentication. within Play! Framework 2.x applications, supporting common OAuth2 providers. such as Facebook or Google in parallel with your own user account service or an out-of-the-box username/password provider.

How to fix Google Play “authentication is required” error?

The Google Play “Authentication is required. You need to sign into your Google Account” error is a common problem on Android devices. You may encounter it as well in Nox App Player. You could fix this Google Play authentication error following the below steps. 1. Clear data from these five apps: 1) Google Play Store. 2) Google Play Services.

What is authenticauthenticate?

Authenticate is a brand-new choice for Java-based authentication within Play! Framework 2.x applications, supporting common OAuth2 providers such as Facebook or Google in parallel with your own user account service or an out-of-the-box username/password provider.

How do I enable authentication on the Google Play Store app?

Open the Google Play Store app . Click Menu Settings. Click Authentication preferences. Choose a setting. Follow the on-screen instructions. This will only work if you're using the Google Play Store app on your Chromebook. Find out more about how to use the Google Play Store on Chromebooks .


1 Answers

There are a number of authentication libraries that already exist which cover many use cases. It'd be best to use something that's well established in the community.

Secure Social - This seems to be the most popular, with lots of documentation. (For both java and scala)

Deadbolt 2 - There are many implementation examples linked from that git repo. It seems a little more geared for java.

Play2 Auth - This is for scala only, but it is well documented and very flexible. (I personally use Play2 Auth)

like image 79
Michael Zajac Avatar answered Sep 30 '22 20:09

Michael Zajac