bakaphp /
phalcon-api
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Gewaer\Api\Controllers; |
||
| 6 | |||
| 7 | use Exception; |
||
| 8 | use Gewaer\Models\Users; |
||
| 9 | use Gewaer\Models\UserLinkedSources; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Base controller |
||
| 13 | * |
||
| 14 | */ |
||
| 15 | class AuthController extends \Baka\Auth\AuthController |
||
| 16 | {
|
||
| 17 | /** |
||
| 18 | * Setup for this controller |
||
| 19 | * |
||
| 20 | * @return void |
||
| 21 | */ |
||
| 22 | public function onConstruct() |
||
| 23 | {
|
||
| 24 | $this->userLinkedSourcesModel = new UserLinkedSources(); |
||
| 25 | $this->userModel = new Users(); |
||
| 26 | |||
| 27 | if (!isset($this->config->jwt)) {
|
||
| 28 | throw new Exception('You need to configure your app JWT');
|
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 |