Example #1
0
 /**
  * Generate CSRF cookie.
  *
  * @param UriInterface $uri Incoming uri.
  * @param string       $token
  * @return Cookie
  */
 protected function tokenCookie(UriInterface $uri, $token)
 {
     return Cookie::create($this->httpConfig->csrfCookie(), $token, $this->httpConfig->csrfLifetime(), $this->httpConfig->basePath(), $this->httpConfig->cookiesDomain($uri));
 }