@@ -25,11 +25,11 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $this->app->register(\Auth0\Login\LoginServiceProvider::class); |
| 27 | 27 | |
| 28 | - $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () { |
|
| 28 | + $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function() { |
|
| 29 | 29 | return new Auth0Service(new UserService()); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - $this->app->bind(Auth0ServiceContract::class, function () { |
|
| 32 | + $this->app->bind(Auth0ServiceContract::class, function() { |
|
| 33 | 33 | return new Auth0Service(new UserService()); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | | This is used to verify the decoded tokens when using RS256 |
| 60 | 60 | | |
| 61 | 61 | */ |
| 62 | - 'authorized_issuers' => [env('AUTH0_DOMAIN')], |
|
| 62 | + 'authorized_issuers' => [ env('AUTH0_DOMAIN') ], |
|
| 63 | 63 | |
| 64 | 64 | /* |
| 65 | 65 | |-------------------------------------------------------------------------- |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | | Token decoding algorithms supported by your API |
| 86 | 86 | | |
| 87 | 87 | */ |
| 88 | - 'supported_algs' => ['RS256'], |
|
| 88 | + 'supported_algs' => [ 'RS256' ], |
|
| 89 | 89 | |
| 90 | 90 | /* |
| 91 | 91 | |-------------------------------------------------------------------------- |
@@ -13,11 +13,11 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | 'supportsCredentials' => true, |
| 16 | - 'allowedOrigins' => ['*'], |
|
| 17 | - 'allowedOriginsPatterns' => [], |
|
| 18 | - 'allowedHeaders' => ['*'], |
|
| 19 | - 'allowedMethods' => ['*'], |
|
| 20 | - 'exposedHeaders' => [], |
|
| 16 | + 'allowedOrigins' => [ '*' ], |
|
| 17 | + 'allowedOriginsPatterns' => [ ], |
|
| 18 | + 'allowedHeaders' => [ '*' ], |
|
| 19 | + 'allowedMethods' => [ '*' ], |
|
| 20 | + 'exposedHeaders' => [ ], |
|
| 21 | 21 | 'maxAge' => 0, |
| 22 | 22 | |
| 23 | 23 | ]; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('users', function (Blueprint $table) { |
|
| 15 | + Schema::create('users', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('identity_id')->unique(); |
| 18 | 18 | $table->string('email'); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $this->artisan('migrate:refresh'); |
| 33 | 33 | } |
| 34 | 34 | $this->artisan('db:seed'); |
| 35 | - $this->beforeApplicationDestroyed(function () { |
|
| 35 | + $this->beforeApplicationDestroyed(function() { |
|
| 36 | 36 | RefreshDatabaseState::$migrated = false; |
| 37 | 37 | }); |
| 38 | 38 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | //Telescope::night(); |
| 24 | 24 | |
| 25 | - Telescope::filter(function (IncomingEntry $entry) { |
|
| 25 | + Telescope::filter(function(IncomingEntry $entry) { |
|
| 26 | 26 | if (is_bool($filter = $this->filterHorizonEntries($entry))) { |
| 27 | 27 | return $filter; |
| 28 | 28 | } |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | protected function filterHorizonEntries(IncomingEntry $entry) |
| 46 | 46 | { |
| 47 | 47 | if ($entry->type === EntryType::REQUEST |
| 48 | - && isset($entry->content['uri']) |
|
| 49 | - && str_contains($entry->content['uri'], 'horizon')) { |
|
| 48 | + && isset($entry->content[ 'uri' ]) |
|
| 49 | + && str_contains($entry->content[ 'uri' ], 'horizon')) { |
|
| 50 | 50 | return false; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ($entry->type === EntryType::EVENT |
| 54 | - && isset($entry->content['name']) |
|
| 55 | - && str_contains($entry->content['name'], 'Horizon')) { |
|
| 54 | + && isset($entry->content[ 'name' ]) |
|
| 55 | + && str_contains($entry->content[ 'name' ], 'Horizon')) { |
|
| 56 | 56 | return false; |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | protected function filterCorsRequests(IncomingEntry $entry) |
| 61 | 61 | { |
| 62 | 62 | if ($entry->type === EntryType::REQUEST |
| 63 | - && isset($entry->content['method']) |
|
| 64 | - && $entry->content['method'] === 'OPTIONS') { |
|
| 63 | + && isset($entry->content[ 'method' ]) |
|
| 64 | + && $entry->content[ 'method' ] === 'OPTIONS') { |
|
| 65 | 65 | return false; |
| 66 | 66 | } |
| 67 | 67 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | protected function gate() |
| 77 | 77 | { |
| 78 | - Gate::define('viewTelescope', function ($user) { |
|
| 78 | + Gate::define('viewTelescope', function($user) { |
|
| 79 | 79 | return in_array($user->email, [ |
| 80 | 80 | // |
| 81 | 81 | ]); |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Modules\Authorization\Entities\Permission; |
| 15 | 15 | |
| 16 | -Route::get('/{id}', 'MachineController@show')->middleware(['permission:'.Permission::SHOW_MACHINE]); |
|
| 17 | -Route::patch('/{id}', 'MachineController@update')->middleware(['permission:'.Permission::UPDATE_MACHINE]); |
|
| 18 | -Route::delete('/{id}', 'MachineController@destroy')->middleware(['permission:'.Permission::DELETE_MACHINE]); |
|
| 16 | +Route::get('/{id}', 'MachineController@show')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]); |
|
| 17 | +Route::patch('/{id}', 'MachineController@update')->middleware([ 'permission:'.Permission::UPDATE_MACHINE ]); |
|
| 18 | +Route::delete('/{id}', 'MachineController@destroy')->middleware([ 'permission:'.Permission::DELETE_MACHINE ]); |
|
| 19 | 19 | |
| 20 | -Route::post('/', 'MachineController@store')->middleware(['permission:'.Permission::CREATE_MACHINE]); |
|
| 21 | -Route::get('/', 'MachineController@index')->middleware(['permission:'.Permission::SHOW_MACHINE]); |
|
| 20 | +Route::post('/', 'MachineController@store')->middleware([ 'permission:'.Permission::CREATE_MACHINE ]); |
|
| 21 | +Route::get('/', 'MachineController@index')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]); |
|
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Modules\Authorization\Entities\Permission; |
| 15 | 15 | |
| 16 | -Route::get('/{id}', 'AccountController@show')->middleware(['permission:'.Permission::SHOW_ACCOUNT]); |
|
| 17 | -Route::patch('/{id}', 'AccountController@update')->middleware(['permission:'.Permission::UPDATE_ACCOUNT]); |
|
| 18 | -Route::delete('/{id}', 'AccountController@destroy')->middleware(['permission:'.Permission::DELETE_ACCOUNT]); |
|
| 16 | +Route::get('/{id}', 'AccountController@show')->middleware([ 'permission:'.Permission::SHOW_ACCOUNT ]); |
|
| 17 | +Route::patch('/{id}', 'AccountController@update')->middleware([ 'permission:'.Permission::UPDATE_ACCOUNT ]); |
|
| 18 | +Route::delete('/{id}', 'AccountController@destroy')->middleware([ 'permission:'.Permission::DELETE_ACCOUNT ]); |
|
| 19 | 19 | |
| 20 | -Route::post('/', 'AccountController@store')->middleware(['permission:'.Permission::CREATE_ACCOUNT]); |
|
| 21 | -Route::get('/', 'AccountController@index')->middleware(['permission:'.Permission::INDEX_ACCOUNT]); |
|
| 20 | +Route::post('/', 'AccountController@store')->middleware([ 'permission:'.Permission::CREATE_ACCOUNT ]); |
|
| 21 | +Route::get('/', 'AccountController@index')->middleware([ 'permission:'.Permission::INDEX_ACCOUNT ]); |
|
@@ -14,5 +14,5 @@ |
||
| 14 | 14 | use Modules\Authorization\Entities\Permission; |
| 15 | 15 | |
| 16 | 16 | Route::get('/me', 'UserController@show'); |
| 17 | -Route::patch('/{id}', 'UserController@update')->middleware(['permission:'.Permission::ASSIGN_ROLES]); |
|
| 18 | -Route::get('/', 'UserController@index')->middleware(['permission:'.Permission::INDEX_USERS]); |
|
| 17 | +Route::patch('/{id}', 'UserController@update')->middleware([ 'permission:'.Permission::ASSIGN_ROLES ]); |
|
| 18 | +Route::get('/', 'UserController@index')->middleware([ 'permission:'.Permission::INDEX_USERS ]); |
|