Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Svn.php

function Svn::doAuthDance

Repositories requests credentials, let's put them in.

Return value

\Composer\Util\Svn

Throws

\RuntimeException

1 call to Svn::doAuthDance()
Svn::executeWithAuthRetry in vendor/composer/composer/src/Composer/Util/Svn.php

File

vendor/composer/composer/src/Composer/Util/Svn.php, line 190

Class

Svn
@author Till Klampaeckel <till@php.net> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Util

Code

protected function doAuthDance() : Svn {
    // cannot ask for credentials in non interactive mode
    if (!$this->io
        ->isInteractive()) {
        throw new \RuntimeException('can not ask for authentication in non interactive mode');
    }
    $this->io
        ->writeError("The Subversion server ({$this->url}) requested credentials:");
    $this->hasAuth = true;
    $this->credentials = [
        'username' => (string) $this->io
            ->ask("Username: ", ''),
        'password' => (string) $this->io
            ->askAndHideAnswer("Password: "),
    ];
    $this->cacheCredentials = $this->io
        ->askConfirmation("Should Subversion cache these credentials? (yes/no) ");
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal