public function OpenIDConnectSession::retrieveStateToken in OpenID Connect / OAuth client 2.x
Get the state token from the session.
Parameters
bool $clear: The value is cleared from the session, unless this is set to FALSE.
Return value
string|null The state token.
Overrides OpenIDConnectSessionInterface::retrieveStateToken
File
- src/
OpenIDConnectSession.php, line 176
Class
- OpenIDConnectSession
- Session service of the OpenID Connect module.
Namespace
Drupal\openid_connectCode
public function retrieveStateToken(bool $clear = TRUE) : ?string {
$ret = $this->session
->get('openid_connect_state');
if ($clear) {
$this->session
->remove('openid_connect_state');
}
return $ret;
}