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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]