1 Reply Latest reply on Aug 6, 2007 6:50 PM by krish p

    How to get the subject in version 2.6?

    krish p Novice

       

      import org.jboss.portal.security.SubjectAssociation;
       import org.jboss.portal.security.PortalSubject;
      
       PortalSubject subject = SubjectAssociation.getSubject();


      What is the equivalent of this in JBoss Portal 2.6?


        • 1. Re: How to get the subject in version 2.6?
          krish p Novice

          I guess I could do something like this:

           Subject subject = (Subject) PolicyContext
           .getContext("javax.security.auth.Subject.container");


          But, how can I set this? Essentially, I want to set this to the new subject (with the additional principals) so that when the JBoss Portal JACC* APIs do a call like the above, they get the updated/modified subject.