| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * Register any application authentication / authorization services. |
||
| 10 | * |
||
| 11 | * @return void |
||
| 12 | */ |
||
| 13 | 24 | public function boot() |
|
| 14 | { |
||
| 15 | 24 | if ($this->app->runningInConsole()) { |
|
| 16 | 24 | $this->publishes([ |
|
| 17 | 24 | __DIR__ . '/../config/fmc-sso-client.php' => config_path('fmc-sso-client.php'), |
|
| 18 | ], 'config'); |
||
| 19 | |||
| 20 | |||
| 21 | 24 | $this->commands([ |
|
| 22 | // |
||
| 23 | ]); |
||
| 24 | } |
||
| 25 | |||
| 26 | 24 | $this->app->singleton(SSOClient::class, function () { |
|
| 27 | 23 | return new SSOClient( |
|
| 28 | 23 | config('services.fmc-sso.client_id', config('fmc-sso-client.client_id')), |
|
| 29 | 23 | config('services.fmc-sso.client_secret', config('fmc-sso-client.client_secret')), |
|
| 30 | 23 | config('services.fmc-sso.redirect_url', config('fmc-sso-client.redirect_url')), |
|
| 31 | 23 | config('services.fmc-sso.scopes', config('fmc-sso-client.scopes')), |
|
| 32 | 23 | config('services.fmc-sso.sso', config('fmc-sso-client.sso', [])), |
|
| 33 | 23 | config('services.fmc-sso.guzzle', config('fmc-sso-client.guzzle', [])), |
|
| 34 | ); |
||
| 35 | }); |
||
| 36 | } |
||
| 37 | |||
| 38 | 24 | public function register() |
|
| 41 | } |
||
| 42 | } |
||
| 43 |