docs: @Override
      public void setCredential(Subject subject) throws CredentialException {
          Set<WSPrincipal> principals = subject.getPrincipals(WSPrincipal.class);
          if (principals.isEmpty()) {
              return;
          }
          if (principals.size() != 1) {
              throw new CredentialException("Too many WSPrincipals in the subject");
          }
          WSPrincipal principal = principals.iterator().next();
          setCredential(subject, principal);
      }