I'm trying to use my own LoginModule. Its is successfully authenticating my username but the problem is when its trying to authorize my roles. Tried: 1. Here is the code snippet from my LoginModule commit method. Code: List roles = new ArrayList(); roles.add( "tomcat_auth_role" ); GenericPrincipal gp = new GenericPrincipal(null, username, null, roles); subject.getPrincipals().add(gp);
3. Added following to server.xml: Code: <Realm className="org.apache.catalina.realm.JAASRealm" appName="Tomcat" userClassNames="org.apache.catalina.realm.GenericPrincipal" roleClassNames="org.apache.catalina.realm.GenericPrincipal" useContextClassLoader="true" debug="2"/> 3. Added following to web.xml: Code: <auth-constraint> <role-name>tomcat_auth_role</role-name> </auth-constraint> Any help would be greatly appreciated. Cheers Joe ------------------------------------------------------------------------------ This email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies. ==============================================================================