src/mako/session/Session.php
public function validateOneTimeToken(string $token): bool
	{
		if(!empty($this->sessionData['mako.tokens']))
		{
			foreach($this->sessionData['mako.tokens'] as $key => $value)
			{
				if(hash_equals($value, $token))
				{
					unset($this->sessionData['mako.tokens'][$key]);

					return true;
				}
			}
		}

		return false;
	}
public function validateOneTimeToken(string $token): bool
	{
		if(!empty($this->sessionData['mako.tokens']))
		{
			foreach($this->sessionData['mako.tokens'] as $key => $value)
			{
				if(hash_equals($value, $token))
				{
					unset($this->sessionData['mako.tokens'][$key]);

					return true;
				}
			}
		}

		return false;
	}
public function validateOneTimeToken ( string $ token ) : bool { if ( ! empty ( $ this -> sessionData [ 'mako.tokens' ] ) ) { foreach ( $ this -> sessionData [ 'mako.tokens' ] as $ key => $ value ) { if ( hash_equals ( $ value , $ token ) ) { unset ( $ this -> sessionData [ 'mako.tokens' ] [ $ key ] ) ; return true ; } } } return false ; }
Validates security token.

@param  string $token Security token
@return bool
Validates security token .