1
0
Fork 0

Display auth again for an origin if the auth type changes

pull/9391/head
Jordi Boggiano 2020-10-30 17:15:40 +01:00
parent 985cef790f
commit d25e66ad53
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -228,9 +228,9 @@ class AuthHelper
$authenticationDisplayMessage = 'Using HTTP basic authentication with username "' . $auth['username'] . '"';
}
if ($authenticationDisplayMessage && !in_array($origin, $this->displayedOriginAuthentications, true)) {
if ($authenticationDisplayMessage && (!isset($this->displayedOriginAuthentications[$origin]) || $this->displayedOriginAuthentications[$origin] !== $authenticationDisplayMessage)) {
$this->io->writeError($authenticationDisplayMessage, true, IOInterface::DEBUG);
$this->displayedOriginAuthentications[] = $origin;
$this->displayedOriginAuthentications[$origin] = $authenticationDisplayMessage;
}
} elseif (in_array($origin, array('api.bitbucket.org', 'api.github.com'), true)) {
return $this->addAuthenticationHeader($headers, str_replace('api.', '', $origin), $url);