Mark Thomas wrote:
eborisow wrote:
If someone has been able to get this working and could provide some help,
that would be great.

Haven't tried it but you should be able to create a custom Realm by extending the existing JNDIRealm and manipulating the user name, probably by overriding the authenticate() methods.

The specific code my look like so:

import org.apache.catalina.realm.*;
import java.security.Principal;
import java.sql.*;
import java.util.*;
import java.io.*;

public class CustomTomcatRealm
   extends JDBCRealm {
public synchronized Principal authenticate(String username, String credentials) {
                  Principal p = super.authenticate(username,credentials);
               if (p != null){
                  String newName = //whatever;
                   ArrayList roles = getRoles(newName);
          p = new GenericPrincipal(this, newName, credentials, roles);
}
return p;
}

}

Check the syntax as it was just done on the fly.

--
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
<a href=http://www.ngasi.com>http://www.ngasi.com</a>
NEW! 8.0 - Centrally manage multiple physical servers


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to