public function setCookieToken($token)
    {
        $this->cookieToken = $token; // Remember this for this request.
        $encrypted = Encryption::encrypt($token, $this->config->getSecretKey()); // Encrypt token.

        // Set cookie on client.
        setcookie($this->config->getCookieName(),
            $encrypted,
            time() + $this->config->getTokenTtl(),
            '/',
            '',
            $this->config->getCookieSslOnly(),
            $this->config->getCookieHttpOnly()); // Store in cookie.
    }