Package org.jboss.test.security.interfaces

Examples of org.jboss.test.security.interfaces.SubjectSession


      InitialContext ctx = new InitialContext(env);
      Object obj = ctx.lookup("caller-info.SubjectSessionFacade");
      obj = PortableRemoteObject.narrow(obj, SubjectSessionHome.class);
      SubjectSessionHome home = (SubjectSessionHome) obj;
      log.debug("Found CustomPrincipalHome");
      SubjectSession bean = home.create();
      log.debug("Created CustomPrincipal");

      HashSet principals = new HashSet();
      principals.add(new SimplePrincipal("CallerInfoFacadeRole"));
      principals.add(new SimplePrincipal("CallerInfoStatelessRole"));
      principals.add(new SimplePrincipal("CallerInfoStatefulRole"));
      principals.add(new SimplePrincipal("CallerInfoEntityRole"));
      bean.validateCallerContext("callerJduke", principals);
      bean.remove();
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.security.interfaces.SubjectSession

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.