Stubbed out storage classes
This commit is contained in:
parent
4a8378c6c2
commit
a834692235
5 changed files with 130 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue