You are here

public function SessionStateHandler::validate in Auth0 Single Sign On 8.2

Perform validation of the returned state with the previously generated state.

Parameters

string $state:

Return value

boolean

Overrides StateHandler::validate

File

vendor/auth0/auth0-php/src/API/Helpers/State/SessionStateHandler.php, line 69

Class

SessionStateHandler
Session based implementation of StateHandler.

Namespace

Auth0\SDK\API\Helpers\State

Code

public function validate($state) {
  $valid = $this->store
    ->get(self::STATE_NAME) == $state;
  $this->store
    ->delete(self::STATE_NAME);
  return $valid;
}