/play-pac4j-java-demo

Play Java demo to test the play-pac4j security library

Primary LanguageJava

This forked project uses play-pac4j-java-demo as the base to test SAML IDP integration with https://samltest.id

  1. Non-SAML client configurations are removed from app/modules/SecurityModule.java, and SAML client configuration code is updated to reflect changes required for testing.
  2. The IDP SAML metadata document from samltest.id is added to custom/samltest.id-providers.xml
  3. Key/Cert files are extracted from conf/samlKeystore.jks for easy of viewing. Commands used are added to custom/readme.txt
  4. The auto-generated sp-metadata.xml file is copied from target/sp-metadata.xml to custom/sp-metadata.example.txt for reference.

The sp-metadata.xml file is valid for 20 years but you may need to re-upload it to samltest.id (https://samltest.id/upload.php) so the SP can be recognized.

Below is the original README content

This play-pac4j-java-demo project is a Java Play framework web app to test the play-pac4j-java security library with various authentication mechanisms: Facebook, Twitter, form, basic auth, CAS, SAML, OpenID Connect, JWT...

Start & test

Build the project and launch the Play app on http://localhost:9000:

cd play-pac4j-java-demo
bin\activator run

To test, you can call a protected url by clicking on the "Protected url by xxx" link, which will start the authentication process with the xxx provider.

Live demo

Find a live demo on Heroku: http://play-pac4j-java-demo.herokuapp.com