code: public Principal principal() {
          if (_subject == null)
              return null;
          Set<Principal> princs = _subject.getPrincipals();
          if (princs.size() == 0)
              return null;
          return (Principal) (princs.toArray()[0]);
      }
docs: The primary principal associated current subject