Closed 030 closed 7 years ago
No, you don't need to copy all of the code in the app directory. But, adding the dependency only gets you so far.
At minimum, you will need your own AbstractUserService implementation and a Resolver implementation. You will also need to bind them in your default module (if you have one), or create a new one.
Check out the other example if you want more than just OAuth.
I do not have to copy the Application.java for example? If I do not do that then the PlayAuthenticate does not seem to be called from the index.scala.html. I have not copied the simple example from this repo, the authentication works. Is this the way to go? I am looking for a kick start: How to use this in a App, e.g. add this to sbt and then to this do that, but now I copied all the code.
I have added the following to the build.sbt
"com.feth" %% "play-authenticate" % "0.8.1"
added
<a href="@com.feth.play.module.pa.controllers.routes.Authenticate.logout">Logout</a>
to myapp/views/index.scala.html
when the app is run it results in:
How to add the library so that I do not have to copy all the code?
I have checked https://github.com/joscha/play-authenticate/tree/master/samples/java/play-authenticate-simple-oauth
My question is whether I should copy all the java code that resides in the app dir or could this be included using the build.sbt?