public function Api::validatePurgeCredentials in Fastly 8.3
Used to validate API token for purge related scope.
Return value
bool TRUE if API token is capable of necessary purge actions, FALSE otherwise.
File
- src/
Api.php, line 282
Class
- Api
- Fastly API for Drupal.
Namespace
Drupal\fastlyCode
public function validatePurgeCredentials() {
if (empty($this->apiKey) || empty($this->serviceId)) {
return FALSE;
}
if ($this
->validatePurgeToken() && $this
->validateTokenServiceAccess()) {
return TRUE;
}
return FALSE;
}