#{extends 'main.html' /} #{set title:'Home' /}

Sample Shibboleth Application

This is an example shibboleth enabled Play! application to demonstrate how the shibboleth module works. When you run this app using play test a Mock Shibboleth SP will be used. In order to test the app out for real with your SP you need to configure the appropriate parameters in conf/application.conf and then run app using play run. Test viewing a restricted page that will require you to be authenticated first.

Try the application tests or read the module documentation.

#{if session.contains("shibboleth")}

Logout using Shibboleth

#{/if} #{else}

Login with Shibboleth

#{/else}

Session Attributes

#{if session?.all()?.keySet()?.size() > 0}
#{list items:session.all().keySet(), as:'key'}
${key}
${session.get(key)}
#{/list}
#{/if} #{else}

No session attributes defined

#{/else}

HTTP Headers

#{if request?.headers?.keySet()?.size() > 0}
#{list items:request.headers.keySet(), as:'name'} #{list items:request.headers.get(name).values, as:'value'}
${name}
${value}
#{/list} #{/list}
#{/if} #{else}

No HTTP headers received

#{/else}

Mock Shibboleth Headers

#{if controllers.shib.MockShibboleth.reload()?.keySet()?.size() > 0}
#{list items:controllers.shib.MockShibboleth.reload().keySet(), as:'name'}
${name}
${controllers.shib.MockShibboleth.get(name).value()}
#{/list}
#{/if} #{else}

No mock Shibboleth headers defined

#{/else}