unjar the $JBOSS_HOME/server/default/deploy/jbossweb-tomcat50.sar/catalina.jar
add one line TEST=com.xxx.TESTSSOAuthenticator to org.apache.catalina.startup.Authenticators.properties. Repack tje catalina.jar. Replace old jar with the new one.
configure the web as it is for form method. However, the login method will be TEST.
implement the com.xxx.TESTSSOAuthenticator to perform autentication. Tomcat FormAuthenticator can be used as a reference.
pack the com.xxx.TESTSSOAuthenticator and related classes in a jar and leave this jar to $JBOSS_HOME/server/default/lib.