users@glassfish.java.net

Re: LDAP user informations

From: <glassfish_at_javadesktop.org>
Date: Mon, 27 Aug 2007 08:43:46 PDT

> glassfish_at_javadesktop.org wrote:
>
> >Hi,
> >
> >I have an application which authenticate against an
> LDAP directory with a LDAPRealm.
> >
> >Can I get more informations about the user who
> logged in ?
> >
> >The LDAP entry is a person and I want to display
> informations about the user who logged in.
> >
> >
> There is getCallerPrincipal() on EJBContext and
> getUserPrincipal() on
> ttpServletRequest , have you tried them ?.
>

yes, I tried them, but I dont get my original ldap context.
getUserPrincipal() gives me a WebPrincipal, but I dont know
how I can get my ldap context from here.

My currect solution is to open an new DirContext and search for the uid.
[Message sent by forum member 'vjordan' (vjordan)]

http://forums.java.net/jive/thread.jspa?messageID=232742