4 Replies Latest reply on Feb 10, 2005 3:01 PM by starksm64

    JaasSecurityManagerService - getUserRoles - method signature

    luxmatic

      Until 3.2.6 - this code would return a list of roles for a Principal:

       String domain = "somedomain";
       MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
       String jaasMgrName = "jboss.security:service=JaasSecurityManager";
       ObjectName jaasMgr = new ObjectName(jaasMgrName);
       Object[] params = {domain, principal};
       String[] signature = {"java.lang.String", Principal.class.getName()};
       Set roles = (Set) server.invoke(jaasMgr, "getUserRoles", params, signature);
      


      In 3.2.6 - a 3rd parameter as added to getUserRoles - Object credential.

      Given a principal, how can I get a credential that will satisfy this method?