@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php namespace Nord\Lumen\OAuth2\Eloquent\Storages; |
2 | 2 | |
3 | 3 | use Carbon\Carbon; |
4 | -use Illuminate\Support\Facades\Log; |
|
5 | 4 | use League\OAuth2\Server\Entity\RefreshTokenEntity; |
6 | 5 | use League\OAuth2\Server\Storage\RefreshTokenInterface; |
7 | 6 | use Nord\Lumen\OAuth2\Eloquent\Models\AccessToken; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('oauth_access_tokens', function (Blueprint $table) { |
|
16 | + Schema::create('oauth_access_tokens', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('session_id')->unsigned(); |
19 | 19 | $table->string('token'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('oauth_sessions', function (Blueprint $table) { |
|
16 | + Schema::create('oauth_sessions', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('client_id')->unsigned(); |
19 | 19 | $table->string('owner_type'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('oauth_clients', function (Blueprint $table) { |
|
16 | + Schema::create('oauth_clients', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('key')->unique(); |
19 | 19 | $table->string('secret'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('oauth_refresh_tokens', function (Blueprint $table) { |
|
16 | + Schema::create('oauth_refresh_tokens', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('access_token_id')->unsigned(); |
19 | 19 | $table->string('token'); |
@@ -30,23 +30,23 @@ |
||
30 | 30 | */ |
31 | 31 | protected function registerContainerBindings(Container $container) |
32 | 32 | { |
33 | - $container->bind(AccessTokenStorage::class, function () { |
|
33 | + $container->bind(AccessTokenStorage::class, function() { |
|
34 | 34 | return new AccessTokenStorage; |
35 | 35 | }); |
36 | 36 | |
37 | - $container->bind(ClientStorage::class, function () { |
|
37 | + $container->bind(ClientStorage::class, function() { |
|
38 | 38 | return new ClientStorage; |
39 | 39 | }); |
40 | 40 | |
41 | - $container->bind(RefreshTokenStorage::class, function () { |
|
41 | + $container->bind(RefreshTokenStorage::class, function() { |
|
42 | 42 | return new RefreshTokenStorage; |
43 | 43 | }); |
44 | 44 | |
45 | - $container->bind(ScopeStorage::class, function () { |
|
45 | + $container->bind(ScopeStorage::class, function() { |
|
46 | 46 | return new ScopeStorage; |
47 | 47 | }); |
48 | 48 | |
49 | - $container->bind(SessionStorage::class, function () { |
|
49 | + $container->bind(SessionStorage::class, function() { |
|
50 | 50 | return new SessionStorage; |
51 | 51 | }); |
52 | 52 |
@@ -33,23 +33,23 @@ |
||
33 | 33 | { |
34 | 34 | $entityManager = $container->make(EntityManagerInterface::class); |
35 | 35 | |
36 | - $container->bind(AccessTokenStorage::class, function () use ($entityManager) { |
|
36 | + $container->bind(AccessTokenStorage::class, function() use ($entityManager) { |
|
37 | 37 | return new AccessTokenStorage($entityManager); |
38 | 38 | }); |
39 | 39 | |
40 | - $container->bind(ClientStorage::class, function () use ($entityManager) { |
|
40 | + $container->bind(ClientStorage::class, function() use ($entityManager) { |
|
41 | 41 | return new ClientStorage($entityManager); |
42 | 42 | }); |
43 | 43 | |
44 | - $container->bind(RefreshTokenStorage::class, function () use ($entityManager) { |
|
44 | + $container->bind(RefreshTokenStorage::class, function() use ($entityManager) { |
|
45 | 45 | return new RefreshTokenStorage($entityManager); |
46 | 46 | }); |
47 | 47 | |
48 | - $container->bind(ScopeStorage::class, function () use ($entityManager) { |
|
48 | + $container->bind(ScopeStorage::class, function() use ($entityManager) { |
|
49 | 49 | return new ScopeStorage($entityManager); |
50 | 50 | }); |
51 | 51 | |
52 | - $container->bind(SessionStorage::class, function () use ($entityManager) { |
|
52 | + $container->bind(SessionStorage::class, function() use ($entityManager) { |
|
53 | 53 | return new SessionStorage($entityManager); |
54 | 54 | }); |
55 | 55 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | protected function registerBindings(Container $container, ConfigRepository $config) |
44 | 44 | { |
45 | - $container->bind(OAuth2Service::class, function ($container) use ($config) { |
|
45 | + $container->bind(OAuth2Service::class, function($container) use ($config) { |
|
46 | 46 | return $this->createService($container, $config[self::CONFIG_KEY]); |
47 | 47 | }); |
48 | 48 |