tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Accessing LDAP after authentication
Date Tue, 24 Aug 2004 15:05:04 GMT
You'll need to connect to LDAP via JNDI to get the other user attributes. 
JNDIRealm only knows how to authenticate and authorize, not user information 

To get the user name - request.getRemoteUser() or request.getUserPrincipal() 
should give you enough information to perform your ldap lookups.


Dave Bender wrote:

> I've gotten a JndiRealm working with Tomcat to authenticate users from our
> LDAP directory and allow them access to various parts of our web application
> based on groups and roles.  That works slick as snot.  Now I'd like to pluck
> a few more tidbits from our LDAP database -- email address, first name, last
> name.  Things like that.
> Is it possible to transparently access the JndiRealm from a JSP or servlet,
> or do I need to make an explicit connection using the InitialContext?   It
> seems like Tomcat's already made and is managing a connection to the LDAP
> server, so my app running inside of it shouldn't have to.  Can I do that?
> Dave

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message