This play-pac4j-java-demo project is a Play 2.x Java project to test the play-pac4j library with Facebook, Twitter, form authentication, basic auth, CAS, myopenid.com...
The play-pac4j library is built to delegate authentication to a provider and be authenticated back in the protected application with a complete user profile retrieved from the provider.
If you want to use this demo with Play framework 2.0.4 or 2.1.0, comment/uncomment the appropriate properties in the project/build.properties file :
# play 2.1
#sbt.version=0.12.2
# play 2.0.4
#sbt.version=0.11.3
and in the project/plugins.sbt file :
// Use the Play sbt plugin for Play projects
// play 2.1 :
//addSbtPlugin("play" % "sbt-plugin" % "2.1.0")
// play 2.0.4 :
// addSbtPlugin("play" % "sbt-plugin" % "2.0.4")
To start quickly :
cd play-pac4j-java-demo
play run
To test, you can call a protected url by clicking on the "Protected by xxx : xxx/index.html" url, which will start the authentication process with the xxx provider.
Or you can click on the "Authenticate with xxx" link, to start manually the authentication process with the xxx provider.
If you need to test with CAS, you can easily setup a CAS server by using one of the following CAS demos :
- cas-overlay-3.5.x for CAS server version 3.5.x-SNAPSHOT
- cas-overlay-demo for CAS server version 4.0.0-SNAPSHOT