code: @Override
      public void setCredential(Subject subject) throws CredentialException {
          Hashtable<String, ?> customProperties = getBasicAuthHashtableFromSubject(subject);
          try {
              // Hashtable with basic auth information, all properties must be there.
              if (customProperties != null && !customProperties.isEmpty() && customProperties.size() == 3) {
                  String realm = getRealm(customProperties);
                  String securityName = getSecurityName(customProperties);
                  SerializableProtectedString password = getPassword(customProperties);
                  setBasicAuthCredential(subject, realm, securityName, password);
              }
          } finally {
              removeBasicAuthHashtable(subject, customProperties);
          }
      }
docs: {@inheritDoc} Create a WSCredential for the realm, user, and password in the subject.
  If a basic auth map is not found, take no action.