Completed
Branch feature/Authentication4 (554da3)
by Schlaefer
03:43
created

ApiAppController::initializeJwtAuth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 29

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 29
rs 9.456
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace Api\Controller;
14
15
use App\Controller\AppController;
16
use Cake\Controller\Component\AuthComponent;
17
use Cake\Core\Configure;
18
use Cake\Event\Event;
19
20
/**
21
 * Api App Controller
22
 */
23
class ApiAppController extends AppController
24
{
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function initialize()
29
    {
30
        parent::initialize();
31
32
        if ($this->components()->has('Csrf')) {
33
            $this->components()->unload('Csrf');
34
        }
35
        if ($this->components()->has('Security')) {
36
            $this->components()->unload('Security');
37
        }
38
    }
39
}
40