mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-07 12:33:53 +05:30
Update auth-server-password.md
This commit is contained in:
parent
ca2e4c71e6
commit
5e950873e4
@ -22,6 +22,8 @@ $passwordGrant = new \League\OAuth2\Server\Grant\PasswordGrant();
|
|||||||
$passwordGrant->setVerifyCredentialsCallback(function ($username, $password) {
|
$passwordGrant->setVerifyCredentialsCallback(function ($username, $password) {
|
||||||
// implement logic here to validate a username and password, return an ID if valid, otherwise return false
|
// 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) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
~~~
|
~~~
|
||||||
|
Loading…
Reference in New Issue
Block a user