Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 328 Bytes
<?php
namespace Demo\Api\Auth;
use Datto\JsonRpc\Auth;
class CookieAuthHandler implements Auth\Handler
{
public function canHandle($method, $arguments)
{
return isset($_COOKIE['token']);
}
public function authenticate($method, $arguments)
{
return $_COOKIE['token'] === 'secret';
}
}