Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 17577 invoked from network); 16 Oct 2005 03:21:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2005 03:21:08 -0000 Received: (qmail 46162 invoked by uid 500); 16 Oct 2005 03:20:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46144 invoked by uid 500); 16 Oct 2005 03:20:53 -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 46133 invoked by uid 99); 16 Oct 2005 03:20:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Oct 2005 20:20:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [66.111.4.27] (HELO out3.smtp.messagingengine.com) (66.111.4.27) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Oct 2005 20:20:53 -0700 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 82931CD150C for ; Sat, 15 Oct 2005 23:20:30 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Sat, 15 Oct 2005 23:20:30 -0400 X-Sasl-enc: kGDc3gmm9T9bl0AZNydgOGSDUBasjv+vM1D3FwF5MnWB 1129432829 Received: from [192.168.1.102] (ip68-104-168-149.ph.ph.cox.net [68.104.168.149]) by frontend2.messagingengine.com (Postfix) with ESMTP id 27DBC570394 for ; Sat, 15 Oct 2005 23:20:29 -0400 (EDT) Message-ID: <4351C6ED.30101@neurofire.com> Date: Sat, 15 Oct 2005 20:20:13 -0700 From: Brad O'Hearne User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Tomcat user principal Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am using the JAASRealm for Tomcat 5.x, and in my JAAS module, I am storing my own Principal subclass as the user principal. In my subsequent servlets, when I invoke the request.getUserPrincipal() method, I am not returned my user principal, but I am instead returned a GenericPrincipal. It appears that this GenericPrincipal is wrapping my user principal class. I have encountered two problems in particular with this: 1) Even though the getClass().getName() method on the GenericPrincipal returns GenericPrinple, if I try casting it to this type, I receive a ClassCastException, so the only type I can work with is the standard Principal interface. 2) There is no way to get at my user principal. Basically what I am trying to do is populate a custom user Principal implementation in my JAAS module, and retrieve my custom user principal again from within my servlet class. Does anyone know how to do this in Tomcat? Thanks, Brad --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org