Commit d59e1901 authored by 孙磊's avatar 孙磊

base

Signed-off-by: 孙磊's avatarsunlei <sunlei@romens.cn>
parent 370c5794
......@@ -20,7 +20,7 @@ use backend\components\v1\authorizationFilter;
* ),
* @OA\Server(
* description="Api server",
* url="/zhangxiaolin/newshopback",
* url="/guoyongzhi/weiShopNew",
* ),
* @OA\SecurityScheme(
* securityScheme="Authorization",
......@@ -80,15 +80,15 @@ class BaseController extends ActiveController
// 格式化输出请求
$behaviors['contentNegotiator']['formats']['text/html'] = Response::FORMAT_JSON;
// 认证
// $behaviors['HttpBearerAuth']=[
// 'class' => HttpBearerAuth::className(),
// 'optional' => ['login'],
// ];
$behaviors['HttpBearerAuth']=[
'class' => HttpBearerAuth::className(),
'optional' => ['login'],
];
// 授权
// $behaviors['authorizationFilter']=[
// 'class' => authorizationFilter::className(),
// 'optional' => ['login'],//过滤不需要验证的action
// ];
$behaviors['authorizationFilter']=[
'class' => authorizationFilter::className(),
'optional' => ['login'],//过滤不需要验证的action
];
return $behaviors;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment