This should do the job: import java.security.AccessController; import java.security.AccessControlContext; import javax.security.auth.Subject; ... AccessControlContext context = AccessController.getContext(); Subject subject = Subject.getSubject(context);
Regards, Martin [EMAIL PROTECTED] schrieb am 20.09.2004, 12:30:50: > > Hi! > > I'm using the Tomcat 5 JAASRealm for authenticating users with my own > LoginModule. In my LoginModule I am populating the Subject object > delivered by the Realm with Principals, Role Principals and Credentials. > > > The authentication and the mapping of my user defined roles to tomcat > roles work fine, but how can I get a reference to the Subject object in > my servlets, JSPs etc. I need them to access the credentials added by my > LoginModule. > > please help, thanks > > Ingo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Schaefer NAXOS Software Solutions GmbH i.G. Herrenstr. 1 69502 Hemsbach Germany Phone:+49 (0) 6201 49298-2 Mobile: +49 (0) 172 6269246 Fax: +49 (0) 6201 49298-1 Mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
