bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

how do i use cookie #1058

Open ALIXLUBIN opened 10 months ago

ALIXLUBIN commented 10 months ago

Hi, I'm trying to use cookies to authenticate users. I'm only stuck on the controller. How am I supposed to retrieve information from the cookie?

$oauth = new Oauth();
$request = Request::createFromGlobals();
$response = new Response();

if(!$oauth->server->verifyResourceRequest($request)){
 $oauth->server->getResponse()->send();
 die('no');
}