Merge pull request #681 from j4m3s/auth-code-grant-docs-slim

Update Slim example in auth-code docs
This commit is contained in:
Alex Bilbie 2016-11-08 13:19:24 +00:00 committed by GitHub
commit 0093836f4b

View File

@ -95,10 +95,7 @@ _Please note: These examples here demonstrate usage with the Slim Framework; Sli
The client will redirect the user to an authorization endpoint.
{% highlight php %}
$app->get('/authorize', function (ServerRequestInterface $request, ResponseInterface $response) use ($app) {
/* @var \League\OAuth2\Server\AuthorizationServer $server */
$server = $app->getContainer()->get(AuthorizationServer::class);
$app->get('/authorize', function (ServerRequestInterface $request, ResponseInterface $response) use ($server) {
try {
@ -140,10 +137,7 @@ $app->get('/authorize', function (ServerRequestInterface $request, ResponseInter
The client will request an access token using an authorization code so create an `/access_token` endpoint.
{% highlight php %}
$app->post('/access_token', function (ServerRequestInterface $request, ResponseInterface $response) use ($app) {
/* @var \League\OAuth2\Server\AuthorizationServer $server */
$server = $app->getContainer()->get(AuthorizationServer::class);
$app->post('/access_token', function (ServerRequestInterface $request, ResponseInterface $response) use ($server) {
try {