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

Breadcrumb

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

function GitHub::requiresSso

Finds whether a request failed due to lacking SSO authorization

Parameters

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

See also

https://docs.github.com/en/rest/overview/other-authentication-methods#a…

File

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

Class

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

Namespace

Composer\Util

Code

public function requiresSso(array $headers) : bool {
    foreach ($headers as $header) {
        if (Preg::isMatch('{^x-github-sso: required}i', trim($header))) {
            return true;
        }
    }
    return false;
}

API Navigation

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