More specifically, he may be looking for:
request.getUserPrincipal().getName(), which returns the actual user name.
I believe that request.getRemoteUser() only returns the username if the
user is authenticated using BASIC authentication.
Gary
--
Gary Gwin
Cafesoft
http://www.cafesoft.com
More specifically, he may be looking for:
request.getUserPrincipal().getName(), which returns the
actual user name.
I believe that request.getRemoteUser() only returns the
username if the
user is authenticated using BASIC authentication.
Actually not true, although I don't say I
Michael,
Principal returns the object implementing the Principal interface, where
request.getRemoteUser is a CGI compatibility call. I know there have
been instances when getRemoteUser did not work as expected for me (I
thought it was with BASIC authentication but that must not be the case).
, December 16, 2002 5:20 PM
Subject: Re: Retrieve User - Realm
More specifically, he may be looking for:
request.getUserPrincipal().getName(), which returns the
actual user name.
I believe that request.getRemoteUser() only returns the
username if the
user is authenticated using BASIC
Hello,
I searched many places and read many things, but I didn't
find any example that retrieve the user from the session
after it is authenticated with realm.
Can someone help me?
Thanks.
Don't E-Mail, ZipMail! http://www.zipmail.com/
--
To
[EMAIL PROTECTED] wrote:
Hello,
I searched many places and read many things, but I didn't
find any example that retrieve the user from the session
after it is authenticated with realm.
Can someone help me?
Thanks.
Don't E-Mail, ZipMail!
It is in the API. Take a look at
javax.servlet.http.HtppServletRequest.getRemoteUser()
Cheers,
Michael
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: Retrieve User - Realm
Hello,
I searched
at
javax.servlet.http.HtppServletRequest.getRemoteUser()
Cheers,
Michael
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: Retrieve User - Realm
Hello,
I searched many places and read many things, but I didn't
find any example that retrieve
: Friday, December 13, 2002 11:53 AM
To: Tomcat Users List
Subject: Re: Retrieve User - Realm
I think you are wrong. What he is looking for is:
HttpServletRequest.getUserPrincipal() that return the
java.security.Principal object created within the Realm.
-- Jeanfrancois
-- Jeanfrancois
Tam
Or, you can use request.getUserPrincipal() to get that info. That
returns a java.security.Principal object that represents the user
(getName() returns the login name).
[EMAIL PROTECTED] 12/13/02 11:39 AM
[EMAIL PROTECTED] wrote:
Hello,
I searched many places and read many things, but I didn't
Hi,
One minor flaw in your idea, it's not possible to retrive the user from the session,
unless you put it there when the user is authenticated.
Meaning, the request.getRemoteUser() will only return you a username (login) in the
actual request the authentication is made, still, depending on the
- Original Message -
From: Tam, Michael [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Saturday, December 14, 2002 5:46 AM
Subject: RE: Retrieve User - Realm
Sorry for the misleading. You are right Jeanfrancois. Thank you for
pointing this out.
If only user name needed, try
12 matches
Mail list logo