tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Harrison <matt.harri...@tmd.tv>
Subject RE: Accessing javax.security.auth.Subject within a session
Date Thu, 15 Jul 2004 13:48:48 GMT
Thanks for your reply Jeanfrancois, but I need more help !!

- I know from the Javadocs the syntax for getting a subject from a login
context, and the login context from an Access controller, but how do you
access the particular login context and/or access controller for a logon.

-also I understand that I can store the subject as a session attribute, but
does Tomcat automatically store the subject as a session attribute?

Matt



> >
> >Can anybody tell me how to access in my servlets the
> >javax.security.auth.Subject object generated at login?
> >  
> >
> You can get it using
> 
> Subject.getSubject(AccessController.getContext())
> 
> 
> >
> Tomcat 5 store the Subject as an attribute. Do a:
> 
> getAttribute("javax.security.auth.subject")
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message