function GitLab::isOAuthExpired
Is the OAuth access token expired?
Return value
bool true on expired token, false if token is fresh or expiration date is not set
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ GitLab.php, line 273
Class
- GitLab
- @author Roshan Gautam <roshan.gautam@hotmail.com>
Namespace
Composer\UtilCode
public function isOAuthExpired(string $originUrl) : bool {
$authTokens = $this->config
->get('gitlab-oauth');
if (isset($authTokens[$originUrl]['expires-at'])) {
if ($authTokens[$originUrl]['expires-at'] < time()) {
return true;
}
}
return false;
}