final public function Base::validateUuid in DRD Agent 8.3
Same name and namespace in other branches
- 4.0.x src/Agent/Auth/Base.php \Drupal\drd_agent\Agent\Auth\Base::validateUuid()
Verify if the given UUID is authorised to access this site.
Parameters
string $uuid: UUID of the authentication object that should be validated.
Return value
bool TRUE if authenticated, FALSE otherwise.
Overrides BaseInterface::validateUuid
File
- src/
Agent/ Auth/ Base.php, line 81
Class
- Base
- Base class for Remote DRD Auth Methods.
Namespace
Drupal\drd_agent\Agent\AuthCode
public final function validateUuid($uuid) : bool {
$config = $this->configFactory
->get('drd_agent.settings');
$authorised = $config
->get('authorised') ?? [];
if (empty($authorised[$uuid])) {
return FALSE;
}
$this->storedSettings = (array) $authorised[$uuid]['authsetting'];
return TRUE;
}