Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Bitbucket.php

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\Util

Code

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;
}
RSS feed
Powered by Drupal