public function createAndSetCsrfCookie($val)
    {
        $masked = $this->client->maskToken($val);
        $name = $this->client->getCsrfParamName();
        $this->setCookie($name, $val);
        return [$name, $masked];
    }