Display auth again for an origin if the auth type changes

main
Jordi Boggiano 4 years ago
parent 985cef790f
commit d25e66ad53
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -228,9 +228,9 @@ class AuthHelper
$authenticationDisplayMessage = 'Using HTTP basic authentication with username "' . $auth['username'] . '"'; $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->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)) { } elseif (in_array($origin, array('api.bitbucket.org', 'api.github.com'), true)) {
return $this->addAuthenticationHeader($headers, str_replace('api.', '', $origin), $url); return $this->addAuthenticationHeader($headers, str_replace('api.', '', $origin), $url);

Loading…
Cancel
Save