@@ -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 | |
@@ -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 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $entity = new AccessTokenEntity($this->server); |
| 18 | 18 | |
| 19 | 19 | $entity->setId('mF_9.B5f-4.1JqM'); |
| 20 | - $entity->setExpireTime(time() + 24*60*60); // NOW + 24h |
|
| 20 | + $entity->setExpireTime(time() + 24 * 60 * 60); // NOW + 24h |
|
| 21 | 21 | |
| 22 | 22 | return $entity; |
| 23 | 23 | } |
@@ -9,6 +9,6 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | public function __construct($basePath = null) |
| 11 | 11 | { |
| 12 | - parent::__construct(realpath(__DIR__ . '/../')); |
|
| 12 | + parent::__construct(realpath(__DIR__.'/../')); |
|
| 13 | 13 | } |
| 14 | 14 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'grant_types' => [ |
| 45 | 45 | 'password' => [ |
| 46 | 46 | 'class' => League\OAuth2\Server\Grant\PasswordGrant::class, |
| 47 | - 'callback' => function ($username, $password) { |
|
| 47 | + 'callback' => function($username, $password) { |
|
| 48 | 48 | return $username.'/'.$password; |
| 49 | 49 | }, |
| 50 | 50 | 'access_token_ttl' => 3600, |