Doc improvements

This commit is contained in:
Alex Bilbie
2016-04-17 13:16:40 +01:00
parent 256c4be99d
commit 4e189ced50
7 changed files with 28 additions and 101 deletions

View File

@@ -63,7 +63,7 @@ $privateKey = 'file://path/to/private.key';
$publicKey = 'file://path/to/public.key';
// Setup the authorization server
$server = new \League\OAuth2\Server\Server(
$server = new \League\OAuth2\Server\AuthorizationServer(
$clientRepository,
$accessTokenRepository,
$scopeRepository,
@@ -95,8 +95,8 @@ 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\Server $server */
$server = $app->getContainer()->get(Server::class);
/* @var \League\OAuth2\Server\AuthorizationServer $server */
$server = $app->getContainer()->get(AuthorizationServer::class);
try {
@@ -140,8 +140,8 @@ The client will request an access token using an authorization code so create an
{% highlight php %}
$app->post('/access_token', function (ServerRequestInterface $request, ResponseInterface $response) use ($app) {
/* @var \League\OAuth2\Server\Server $server */
$server = $app->getContainer()->get(Server::class);
/* @var \League\OAuth2\Server\AuthorizationServer $server */
$server = $app->getContainer()->get(AuthorizationServer::class);
try {