Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 76619 invoked from network); 18 Nov 2008 09:18:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2008 09:18:58 -0000 Received: (qmail 5246 invoked by uid 500); 18 Nov 2008 09:18:55 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 5222 invoked by uid 500); 18 Nov 2008 09:18:55 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 5211 invoked by uid 99); 18 Nov 2008 09:18:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 01:18:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 09:17:33 +0000 Received: from [192.168.250.50] (p549EA49C.dip0.t-ipconnect.de [84.158.164.156]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id mAI9Hwsn008578 for ; Tue, 18 Nov 2008 10:17:59 +0100 Message-ID: <492287A7.8030401@ice-sa.com> Date: Tue, 18 Nov 2008 10:15:19 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: HttpServletRequest.getUserPrincipal References: <49218B2E.3080206@ice-sa.com> <0AAE5AB84B013E45A7B61CB66943C17215A3942802@USEA-EXCH7.na.uis.unisys.com> <4921C5B7.9070100@ice-sa.com> <0AAE5AB84B013E45A7B61CB66943C17215A3A3DE59@USEA-EXCH7.na.uis.unisys.com> In-Reply-To: <0AAE5AB84B013E45A7B61CB66943C17215A3A3DE59@USEA-EXCH7.na.uis.unisys.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/8645/Tue Nov 18 05:30:32 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-97.7 required=2.5 tests=DNS_FROM_SECURITYSAGE, RCVD_IN_PBL,RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=3.2.3 Caldarale, Charles R wrote: >> From: Andr� Warnier [mailto:aw@ice-sa.com] >> Subject: Re: HttpServletRequest.getUserPrincipal > > Sorry for not answering sooner you are forgiven - it's easier to do the source searching at home. > >> is getRemoteUser() merely a shortcut, under which >> happens a getUserPrincipal.getName() > > At least in Tomcat, they're the same: > > public String getRemoteUser() { > if (userPrincipal != null) { > return (userPrincipal.getName()); > } else { > return (null); > } > } > > Can't speak for what goes on in other containers, or why the spec is somewhat ambiguous in that area. > Thanks for clarifying this anyway for Tomcat. As for the 1.5 Java specs, there are indeed a couple of black holes in the "Principal" area. I tried to follow the links between doc pages in that respect, but could never get a clear description of what a "Principal" really looks like. The only thing being said clearly is that "it" contains the authenticated user "id", or "name", and that "it" is null when the user is not authenticated. --------------------------------------------------------------------- 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