You are here

public function Oauth::authRequestStateIsValid in Media: Acquia DAM 8

Validate that the state token in an auth request is valid.

Parameters

string $token: The CSRF token from the auth request.

Return value

bool TRUE if the state is valid. FALSE otherwise.

Overrides OauthInterface::authRequestStateIsValid

File

src/Oauth.php, line 108

Class

Oauth
OAuth Class.

Namespace

Drupal\media_acquiadam

Code

public function authRequestStateIsValid($token) {
  return $this->csrfTokenGenerator
    ->validate($token, 'media_acquiadam.oauth');
}