1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Developed bitbucket-oauth functionality.

This commit is contained in:
Paul Wenke 2016-03-06 22:05:00 -05:00
parent 3cea62b6ed
commit d5332a1b5c
8 changed files with 245 additions and 2 deletions

View file

@ -88,6 +88,7 @@ abstract class BaseIO implements IOInterface
$githubOauth = $config->get('github-oauth') ?: array();
$gitlabOauth = $config->get('gitlab-oauth') ?: array();
$httpBasic = $config->get('http-basic') ?: array();
$bitbucketOauth = $config->get('bitbucket-oauth') ?: array();
// reload oauth token from config if available
foreach ($githubOauth as $domain => $token) {
@ -106,6 +107,10 @@ abstract class BaseIO implements IOInterface
$this->checkAndSetAuthentication($domain, $cred['username'], $cred['password']);
}
foreach ($bitbucketOauth as $domain => $cred) {
$this->checkAndSetAuthentication($domain, $cred['consumer-key'], $cred['consumer-secret']);
}
// setup process timeout
ProcessExecutor::setTimeout((int) $config->get('process-timeout'));
}