Update auth-server-password.md

This commit is contained in:
Leevi Graham 2014-11-06 17:19:42 +11:00
parent ca2e4c71e6
commit 5e950873e4

View File

@ -22,6 +22,8 @@ $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
});
$server->addGrantType($passwordGrant);
~~~
@ -59,4 +61,4 @@ $router->post('/access_token', function (Request $request) use ($server) {
}
});
~~~
~~~