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

    How to get the subject in version 2.6?

    kpalania

       

      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?
          kpalania

          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.