Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function boot() |
||
14 | { |
||
15 | $this->app[DingoAuth::class]->extend('oauth', function ($app) { |
||
16 | $provider = new OAuth2($app['oauth2-server.authorizer']->getChecker()); |
||
17 | |||
18 | $provider->setUserResolver(function ($id) { |
||
19 | Auth::loginUsingId($id); |
||
20 | |||
21 | return User::findOrFail($id); |
||
22 | }); |
||
23 | |||
24 | $provider->setClientResolver(function ($id) { |
||
|
|||
25 | //TODO: Logic to return a client by their ID. |
||
26 | }); |
||
27 | |||
28 | return $provider; |
||
29 | }); |
||
30 | } |
||
31 | |||
37 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.