You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vackar <v....@dundee.ac.uk> on 2008/01/16 11:32:46 UTC

How to get the authenticated user

Hi,

Does anyone know how to get the username of the person who is currently
logged in.
I'm running tomcat 6 and authentication is done using LDAP.
Something link <nameOfTagLib: nameofMethodToGetUsername> woulf be nice :-D

Thanks,
Vackar
-- 
View this message in context: http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14877650.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: How to get the authenticated user

Posted by Vackar <v....@dundee.ac.uk>.
Thanks for the tip David! For those who are uding jsf then it's done like
this:
FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();

Next question is:- does anyone know how to expire the authenticated session
- used for logout.

Thanks,
Vackar



Vackar wrote:
> 
> Apologies for re-posts, I edited the original message a couple of times
> because I can't type... Sorry:-((
> 
> David Smith-2 wrote:
>> 
>> 1. Reposts are annoying and I saw this post *3* times.  Please wait for 
>> answers.
>> 
>> 2. Assuming you are trying to do this in a jsp, have your considered 
>> ${pageContext.request.remoteUser} ?
>> 
>> --David
>> 
>> Vackar wrote:
>>> Hi,
>>>
>>> Does anyone know how to get the username of the person who is currently
>>> logged in.
>>> I'm running tomcat 6 and authentication is done using LDAP.
>>> Something line <nameOfTagLib: nameofMethodToGetUsername> woulf be nice
>>> :-D
>>>
>>> Thanks,
>>> Vackar
>>>   
>> 
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14878654.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: How to get the authenticated user

Posted by Vackar <v....@dundee.ac.uk>.
Apologies for re-posts, I edited the original message a couple of times
because I can't type... Sorry:-((

David Smith-2 wrote:
> 
> 1. Reposts are annoying and I saw this post *3* times.  Please wait for 
> answers.
> 
> 2. Assuming you are trying to do this in a jsp, have your considered 
> ${pageContext.request.remoteUser} ?
> 
> --David
> 
> Vackar wrote:
>> Hi,
>>
>> Does anyone know how to get the username of the person who is currently
>> logged in.
>> I'm running tomcat 6 and authentication is done using LDAP.
>> Something line <nameOfTagLib: nameofMethodToGetUsername> woulf be nice
>> :-D
>>
>> Thanks,
>> Vackar
>>   
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-the-authenticated-user-tp14877650p14878232.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: How to get the authenticated user

Posted by David Smith <dn...@cornell.edu>.
1. Reposts are annoying and I saw this post *3* times.  Please wait for 
answers.

2. Assuming you are trying to do this in a jsp, have your considered 
${pageContext.request.remoteUser} ?

--David

Vackar wrote:
> Hi,
>
> Does anyone know how to get the username of the person who is currently
> logged in.
> I'm running tomcat 6 and authentication is done using LDAP.
> Something line <nameOfTagLib: nameofMethodToGetUsername> woulf be nice :-D
>
> Thanks,
> Vackar
>   


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