From f9c0cb08e0489ccaf56bc19ce54bda8caf7d6ee4 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 12 Jan 2016 22:58:25 +0000 Subject: [PATCH] Removed unused code --- bin/generate-crypto-key | 14 -------------- examples/public/jwt.php | 40 ---------------------------------------- 2 files changed, 54 deletions(-) delete mode 100755 bin/generate-crypto-key delete mode 100644 examples/public/jwt.php diff --git a/bin/generate-crypto-key b/bin/generate-crypto-key deleted file mode 100755 index 3e2bbb2e..00000000 --- a/bin/generate-crypto-key +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/env php -addRepository(new ClientRepository()); -$server->addRepository(new ScopeRepository()); -$server->addRepository(new AccessTokenRepository()); -$server->addRepository(new UserRepository()); - -// Enable the password grant, respond with JWTs -$server->enableGrantType('PasswordGrant', new JsonWebTokenType()); - -// Setup JWT params -JsonWebTokenType::setIssuer('http://example.com/'); -JsonWebTokenType::setAudience('http://myawesomeapp.com/'); -JsonWebTokenType::setEncryptionKey('foobar123'); - -// Setup app + routing -$application = new \Proton\Application(); -$application->post('/access_token', function (Request $request) use ($server) { - try { - return $server->getAccessTokenResponse($request); - } catch (OAuthException $e) { - return $e->generateHttpResponse(); - } -}); - -// Run the app -$application->run();