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.
    }
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.
    }
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. }
Encrypts an authentication token into the authentication cookie.

@param string $token the token to store in the cookie
Encrypts an authentication token into the authentication cookie .