1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

Update related docs and config definitions

This commit is contained in:
moyo 2016-07-06 16:25:18 +08:00
parent 997a062ebd
commit c4ac59601f
5 changed files with 21 additions and 5 deletions

View file

@ -90,6 +90,7 @@ abstract class BaseIO implements IOInterface, LoggerInterface
$bitbucketOauth = $config->get('bitbucket-oauth') ?: array();
$githubOauth = $config->get('github-oauth') ?: array();
$gitlabOauth = $config->get('gitlab-oauth') ?: array();
$gitlabToken = $config->get('gitlab-token') ?: array();
$httpBasic = $config->get('http-basic') ?: array();
// reload oauth tokens from config if available
@ -109,6 +110,10 @@ abstract class BaseIO implements IOInterface, LoggerInterface
$this->checkAndSetAuthentication($domain, $token, 'oauth2');
}
foreach ($gitlabToken as $domain => $token) {
$this->checkAndSetAuthentication($domain, $token, 'private-token');
}
// reload http basic credentials from config if available
foreach ($httpBasic as $domain => $cred) {
$this->checkAndSetAuthentication($domain, $cred['username'], $cred['password']);