2 Replies Latest reply on Jan 15, 2004 6:04 PM by baric

    access to custom Principal in EJB and JSP's

    baric

      I have a custom LoginModule that once a user is authenticated, getRoleSets() returns two Group's, "Roles" and "CallerPrincipal". Now in the CallerPrincipal group, I have added a custom Principal object (subclass of SimplePrincipal), which has some extra information useful to users who have been authenticated with this LoginModule, in this case an instance of lotus.domino.Session connected to a predetermined Domino server. In an EJB, I can call EJBContext.getCallerPrincipal() and it gives me this custom DominoPrincipal object and everything is happy.

      But in a JSP secured with my custom LoginModule, if I call request.getUserPrincipal(), I get a generic SimplePrincipal object, not the custom DominoPrincipal object that I want.

      Does anyone know how to get at a custom Principal from the CallerPrincipal Group from inside a JSP, or is there some other obvious way to do this that I am overlooking?

      Environment is JBoss 3.2.2 with the default Tomcat servlet container.

      Thanks...Baric