function Bitbucket::getTokenFromConfig
@phpstan-assert-if-true array{access_token: string} $this->token
1 call to Bitbucket::getTokenFromConfig()
- Bitbucket::requestToken in vendor/
composer/ composer/ src/ Composer/ Util/ Bitbucket.php - Retrieves an access token from Bitbucket.
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Bitbucket.php, line 240
Class
- Bitbucket
- @author Paul Wenke <wenke.paul@gmail.com>
Namespace
Composer\UtilCode
private function getTokenFromConfig(string $originUrl) : bool {
$authConfig = $this->config
->get('bitbucket-oauth');
if (!isset($authConfig[$originUrl]['access-token'], $authConfig[$originUrl]['access-token-expiration']) || time() > $authConfig[$originUrl]['access-token-expiration']) {
return false;
}
$this->token = [
'access_token' => $authConfig[$originUrl]['access-token'],
];
return true;
}