File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change 22
33namespace app \modules \v1 \controllers ;
44
5- use yii \filters \auth \CompositeAuth ;
6- use yii \filters \auth \HttpBasicAuth ;
7- use yii \filters \auth \HttpBearerAuth ;
8- use yii \filters \auth \QueryParamAuth ;
5+ use app \helpers \BehaviorsFromParamsHelper ;
96use yii \rest \ActiveController ;
107
118/*
12- * Created on Thu Feb 22 2018
13- * By Heru Arief Wijaya
14- * Copyright (c) 2018 belajararief.com
9+ *
10+ * @author Heru Arief Wijaya
11+ * 2020 @ belajararief.com
1512 */
1613
1714class PostController extends ActiveController
@@ -21,14 +18,7 @@ class PostController extends ActiveController
2118 public function behaviors ()
2219 {
2320 $ behaviors = parent ::behaviors ();
24- $ behaviors ['authenticator ' ] = [
25- 'class ' => CompositeAuth::className (),
26- 'authMethods ' => [
27- HttpBasicAuth::className (),
28- HttpBearerAuth::className (),
29- QueryParamAuth::className (),
30- ],
31- ];
21+ $ behaviors = BehaviorsFromParamsHelper::behaviors ($ behaviors );
3222 return $ behaviors ;
3323 }
3424}
You can’t perform that action at this time.
0 commit comments