Home
To enable JAAS, edit your start.ini or start.d/*.ini files and add the following lines:
OPTIONS=jaas jaas.login.conf=etc/login.conf etc/jetty-jaas.xml
For the jetty distribution demos, jaas is already enabled in the start.d/900-demo.ini file and sets the jaas.login.conf property to webapps.demo/test-jaas.d/login.conf for use with the webapps.demo/test-jaas.war web application.
The full source of this demonstration is available here.
Click on the following link to test JAAS authentication and role-based web security constraint authorization.
This demo uses a simple login module that stores its configuration in a properties file. There are other types of login module provided with the jetty distro. For full information, please refer to the Jetty 9 documentation.
To authenticate successfully with this demonstration, you must use username="me" with password="me". All other usernames, passwords should result in authentication failure.
Login