Stubbed out storage classes

This commit is contained in:
Josh Sherman 2014-10-11 07:40:09 -04:00
parent 4a8378c6c2
commit a834692235
5 changed files with 130 additions and 0 deletions

View file

@ -129,6 +129,24 @@ class Resource extends Object
throw new \Exception('Invalid access token.', 401);
}
*/
$server = new \League\OAuth2\Server\AuthorizationServer;
$server->setSessionStorage(new OAuth2\SessionStorage);
$server->setAccessTokenStorage(new OAuth2\AccessTokenStorage);
$server->setClientStorage(new OAuth2\ClientStorage);
$server->setScopeStorage(new OAuth2\ScopeStorage);
$passwordGrant = new \League\OAuth2\Server\Grant\PasswordGrant();
$passwordGrant->setVerifyCredentialsCallback(function ($username, $password)
{
// implement logic here to validate a username and
// password, return an ID if valid, otherwise return false
return false;
});
var_dump(microtime());
exit('EOF');
break;
default: