Package org.jboss.security

Examples of org.jboss.security.SubjectSecurityManager


   protected Subject getActiveSubject(HttpServletResponse httpResponse)
      throws NamingException
   {
      InitialContext ctx = new InitialContext();
      SubjectSecurityManager mgr = (SubjectSecurityManager) ctx.lookup("java:comp/env/security/securityMgr");
      Subject s0 = mgr.getActiveSubject();
      httpResponse.addHeader("X-SubjectFilter-SubjectSecurityManager", s0.toString());
      Subject s1 = (Subject) ctx.lookup("java:comp/env/security/subject");
      httpResponse.addHeader("X-SubjectFilter-ENC", s1.toString());
      return s1;
   }
View Full Code Here


        
         log("hashCodeShouldMatch="+hashCodeShouldMatch);
         //Flush the Cache - this should not have any adverse effect on the testSubject
         flushAuthenticationCache("deepcopy", anilPrincipal);
         context = new InitialContext();
         SubjectSecurityManager manager = (SubjectSecurityManager)context.lookup("java:comp/env/security/securityMgr");
         Subject testSubject = new Subject();
         //Do a validation so that the subject gets added to the cache for the test principal
         log("isValid="+manager.isValid(scottPrincipal,"echoman", testSubject));
         Subject authSubject = this.getAuthenticatedSubject(manager);
         log("AuthenticatedSubject["+authSubject+"]")
         log("CopiedSubject["+testSubject+"]")
         //Flush the Cache - this should not have any adverse effect on the testSubject
         flushAuthenticationCache("deepcopy", anilPrincipal);
View Full Code Here

    }

    protected String getSecurityDomain() throws NamingException {
        // Get the SecurityManagerService from JNDI
        InitialContext ctx = new InitialContext();
        SubjectSecurityManager ssm = (SubjectSecurityManager) ctx.lookup("java:comp/env/security/securityMgr");
        if (ssm == null)
            throw logger.nullValueError("Unable to get the subject security manager");
        return ssm.getSecurityDomain();
    }
View Full Code Here

TOP

Related Classes of org.jboss.security.SubjectSecurityManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.