1 Reply Latest reply on May 14, 2004 11:44 AM by Dmitry Sklyut

    Obtaining current JAAS Subject

    Dmitry Sklyut Newbie

      Hi All,

      I wonder if the following code will work in JBoss:

      AccessControlContext context = AccessController.getContext();
      return Subject.getSubject(context);
      


      I would like to get a handle to the current Subject in web or ejb tier. I would like to find out the "roles" that Principal has (e.i is Principal an "Admin" or "Customer"). I wanted to use Group("Roles") as a store for them and then have an API
      Security.isAdminUser(User)

      to check on a role.

      Thanks

      Dmitry