Oauth2CertificatesController::behaviors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace rhertogh\Yii2Oauth2Server\controllers\web;
4
5
use rhertogh\Yii2Oauth2Server\controllers\web\base\Oauth2BaseApiController;
6
use rhertogh\Yii2Oauth2Server\interfaces\controllers\web\certificates\Oauth2JwksActionInterface;
7
use rhertogh\Yii2Oauth2Server\interfaces\controllers\web\Oauth2CertificatesControllerInterface;
8
use yii\filters\VerbFilter;
9
use yii\helpers\ArrayHelper;
10
11
class Oauth2CertificatesController extends Oauth2BaseApiController implements Oauth2CertificatesControllerInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16 5
    public function behaviors()
17
    {
18 5
        return ArrayHelper::merge(parent::behaviors(), [
19 5
            'verbFilter' => [
20 5
                'class' => VerbFilter::class,
21 5
                'actions' => [
22 5
                    static::ACTION_NAME_JWKS => ['GET'],
23 5
                ],
24 5
            ],
25 5
        ]);
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31 5
    public function actions()
32
    {
33 5
        return [
34 5
            static::ACTION_NAME_JWKS => Oauth2JwksActionInterface::class,
35 5
        ];
36
    }
37
}
38