6 Replies Latest reply on Aug 1, 2005 12:41 PM by Alex Chesnokov

    How to use my own Principal class?

    Alex Chesnokov Newbie

      Hi everybody!

      I've developed my own MyLoginModule class implementing javax.security.auth.spi.LoginModule. Within the MyLoginModule I'm using MyPrincipal class implementing java.security.Principal.

      This working fine with my servlet/struts based web application but when I try to get the Principal from HttpServletRequest using theRequest.getUserPrincipal() it return org.jboss.security.SimplePrincipal instance...

      The question is: what I gonna do to get instance of MyPrincipal from HttpServletRequest?

      The main idea I wish go keep some additional info in Principal like USER_ID, First & Last names etc. (in other words all user info I keep in database) to avoid looking this info every time I'm procesing HTTPRequest - I'd like to get full user info when user logging in and keep it in session

      I'll very appreciate for any help or advice

      Regards,

      Alex Chesnokov