joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 367 forks source link

What provider do I need for a email/password authentication? #304

Closed nem25 closed 8 years ago

nem25 commented 8 years ago

Hi,

Sorry I know this is not really an issue but the readme only has info about Google Authenticator.

I just want a simple email and password login where my users are stored in a mongo db. I don't want google or any social media authentication.

The example code has a few different providers and AuthUsers so I'm not really sure which one I need.

Thanks!

joscha commented 8 years ago

You need the one called password.

nem25 commented 8 years ago

So any of the providers in here - https://github.com/joscha/play-authenticate/tree/master/code/app/com/feth/play/module/pa/providers/password ?

joscha commented 8 years ago

Yes, have a look at the sample: https://github.com/joscha/play-authenticate/blob/4b3fe4965713f218df5950eedb555b89f53f0519/samples/java/play-authenticate-usage/app/module/MyModule.java#L39

nem25 commented 8 years ago

Ah ok so this one - https://github.com/joscha/play-authenticate/blob/4b3fe4965713f218df5950eedb555b89f53f0519/samples/java/play-authenticate-usage/app/providers/MyUsernamePasswordAuthProvider.java Awesome thanks so much for your help!

joscha commented 8 years ago

Yep, you basically register a provider with a given key. You can write your own, use one of the ones that come with play-authenticate or extend from one of them.