Updated examples

This commit is contained in:
Alex Bilbie
2016-01-13 00:47:41 +00:00
parent 20ad5d251c
commit 94b221c8a1
4 changed files with 248 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ use Slim\Http\Response;
include(__DIR__ . '/../vendor/autoload.php');
// Setup the authorization server
$server = new Server();
$server = new Server('file://' . __DIR__ . '/../private.key');
// Init our repositories
$clientRepository = new ClientRepository();
@@ -30,7 +30,7 @@ $app = new App([Server::class => $server]);
$app->post('/access_token', function (Request $request, Response $response) {
/** @var Server $server */
$server = $this->getContainer()->get(Server::class);
$server = $this->get(Server::class);
try {
return $server->respondToRequest($request);
} catch (OAuthServerException $e) {