You are here

public function SharedSecret::validate in DRD Agent 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Agent/Auth/SharedSecret.php \Drupal\drd_agent\Agent\Auth\SharedSecret::validate()

Validate authentication of the current request with the given settings.

Parameters

array $settings: Authentication settings from the request.

Return value

bool TRUE if authenticated, FALSE otherwise.

Overrides BaseInterface::validate

File

src/Agent/Auth/SharedSecret.php, line 13

Class

SharedSecret
Implements the SharedSecret authentication method.

Namespace

Drupal\drd_agent\Agent\Auth

Code

public function validate(array $settings) : bool {
  return $settings['secret'] === $this->storedSettings['secret'];
}