Version 3

    SimpleServerLoginModule

     

    A simple server login module useful to quick setup of security for testing

    purposes. It implements the following simple algorithm:

    • if password is null, authenticate the user and assign an identity of "guest"

          and a role of "guest".

    • else if password is equal to the user name, assign an identity equal to

          the username and both "user" and "guest" roles

    • else authentication fails.

     

     

     

    Example login-config.xml usage:

        <application-policy name="simple">
            <authentication>
                <login-module code="org.jboss.security.auth.spi.SimpleServerLoginModule" 
                              flag="required" ></login-module>
           </authentication>
        </application-policy>
    

     

    Example web.xml usage:

        <security-constraint>
            <web-resource-collection>
                <!-- configure resources to protect here -->
            </web-resource-collection>
            <auth-constraint>
                <role-name>user</role-name> 
            </auth-constraint>
        </security-constraint>
    

     

    Example jboss-web.xml usage:

        <jboss-web>
            <security-domain>java:/jaas/simple</security-domain>
        </jboss-web>