From c017b5934274b7da2bd4acefa882d390d3763153 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 10 Apr 2016 16:15:26 +0100 Subject: [PATCH] Removed dead code --- examples/public/auth_code.php | 2 -- examples/public/implicit.php | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/public/auth_code.php b/examples/public/auth_code.php index 12f7cc49..d0ee1a5e 100644 --- a/examples/public/auth_code.php +++ b/examples/public/auth_code.php @@ -29,7 +29,6 @@ $app = new App([ $accessTokenRepository = new AccessTokenRepository(); $authCodeRepository = new AuthCodeRepository(); $refreshTokenRepository = new RefreshTokenRepository(); - $userRepository = new UserRepository(); $privateKeyPath = 'file://' . __DIR__ . '/../private.key'; $publicKeyPath = 'file://' . __DIR__ . '/../public.key'; @@ -48,7 +47,6 @@ $app = new App([ new AuthCodeGrant( $authCodeRepository, $refreshTokenRepository, - $userRepository, new \DateInterval('PT10M') ), new \DateInterval('PT1H') diff --git a/examples/public/implicit.php b/examples/public/implicit.php index d5bce903..a7c441cc 100644 --- a/examples/public/implicit.php +++ b/examples/public/implicit.php @@ -7,7 +7,6 @@ use OAuth2ServerExamples\Entities\UserEntity; use OAuth2ServerExamples\Repositories\AccessTokenRepository; use OAuth2ServerExamples\Repositories\ClientRepository; use OAuth2ServerExamples\Repositories\ScopeRepository; -use OAuth2ServerExamples\Repositories\UserRepository; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Slim\App; @@ -24,7 +23,6 @@ $app = new App([ $clientRepository = new ClientRepository(); $scopeRepository = new ScopeRepository(); $accessTokenRepository = new AccessTokenRepository(); - $userRepository = new UserRepository(); $privateKeyPath = 'file://' . __DIR__ . '/../private.key'; $publicKeyPath = 'file://' . __DIR__ . '/../public.key'; @@ -39,7 +37,7 @@ $app = new App([ ); // Enable the implicit grant on the server with a token TTL of 1 hour - $server->enableGrantType(new ImplicitGrant($userRepository, new \DateInterval('PT1H'))); + $server->enableGrantType(new ImplicitGrant(new \DateInterval('PT1H'))); return $server; },