code: private boolean isSubjectValid(Subject subject) {
          final WSCredential wsCred = getWSCredentialFromSubject(subject);
          if (wsCred == null) {
              return false;
          } else {
              // TODO revisit this when EJBs are supported add additional
              // checks would be required
              return !wsCred.isUnauthenticated() && !wsCred.isBasicAuth();
          }
      }
docs: Check if the subject has a WScredential, is authenticated, and is not a basic auth credential.
  
  @param subject
  the subject to check
  @return true if the subject has a WSCredential that is not marked as
  unauthenticated and is not marked as basic auth, otherwise false