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\UtilCode
public function requiresSso(array $headers) : bool {
foreach ($headers as $header) {
if (Preg::isMatch('{^x-github-sso: required}i', trim($header))) {
return true;
}
}
return false;
}