code: public String getEffectiveInternalUsername() {
          if (m_internalUsername != null) {
              return m_internalUsername;
          } else if (m_defaultConfig != null) {
              return m_defaultConfig.getEffectiveCallUsername();
          } else {
              return null;
          }
      }
docs: Get the effective internal username for basic auth Fedora-to-self calls.
  This will be the internal username, if set, or the inherited call value
  from the default role, if set, or null.