public function getCookieToken()
    {
        // If we have accessed the cookie token this request already.
        if ($this->cookieToken !== null) {
            return $this->cookieToken;
        }

        $name = $this->config->getCookieName();
        $plain = '';
        if (isset($_COOKIE[$name])) {
            $encrypted = $_COOKIE[$name]; // Read encrypted cookie.
            $plain = Encryption::decrypt($encrypted, $this->config->getSecretKey());  // Decrypt cookie.
        }
        $this->cookieToken = $plain; // Don't access cookie again.

        return $plain;
    }