src/Koldy/Security/Csrf.php
public static function isTokenValid(string $token): bool
    {
        if (!static::hasTokenStored()) {
            return false;
        }

        $storedToken = static::getStoredToken();
        return $storedToken->getToken() === $token;
    }
public static function isTokenValid(string $token): bool
    {
        if (!static::hasTokenStored()) {
            return false;
        }

        $storedToken = static::getStoredToken();
        return $storedToken->getToken() === $token;
    }
public static function isTokenValid ( string $ token ) : bool { if ( ! static :: hasTokenStored ( ) ) { return false ; } $ storedToken = static :: getStoredToken ( ) ; return $ storedToken -> getToken ( ) === $ token ; }
Check if given CSRF token is valid

@param string $token

@return bool
@throws ConfigException
@throws Exception
@throws \Koldy\Exception
Check if given CSRF token is valid