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

Breadcrumb

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

function GitHub::getSsoUrl

Extract SSO URL from response.

Parameters

string[] $headers Headers from Composer\Downloader\TransportException.:

File

vendor/composer/composer/src/Composer/Util/GitHub.php, line 188

Class

GitHub
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Util

Code

public function getSsoUrl(array $headers) : ?string {
    foreach ($headers as $header) {
        $header = trim($header);
        if (false === stripos($header, 'x-github-sso: required')) {
            continue;
        }
        if (Preg::isMatch('{\\burl=(?P<url>[^\\s;]+)}', $header, $match)) {
            return $match['url'];
        }
    }
    return null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal