mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
优化注释
This commit is contained in:
parent
c7e8182166
commit
37b983619a
@ -25,9 +25,19 @@ use crmeb\services\CacheService;
|
||||
*/
|
||||
class AdminAuthTokenMiddleware implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/04/07
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next)
|
||||
{
|
||||
$authInfo = null;
|
||||
$token = trim(ltrim($request->header(Config::get('cookie.token_name', 'Authori-zation')), 'Bearer'));
|
||||
/** @var AdminAuthServices $service */
|
||||
$service = app()->make(AdminAuthServices::class);
|
||||
|
||||
@ -23,6 +23,18 @@ use crmeb\interfaces\MiddlewareInterface;
|
||||
*/
|
||||
class AuthTokenMiddleware implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @param bool $force
|
||||
* @return int|mixed|\think\Response
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/04/07
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next, bool $force = true)
|
||||
{
|
||||
$authInfo = null;
|
||||
|
||||
@ -21,6 +21,15 @@ use crmeb\interfaces\MiddlewareInterface;
|
||||
*/
|
||||
class BaseMiddleware implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/04/07
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next, bool $force = true)
|
||||
{
|
||||
if (!$request->hasMacro('uid')) {
|
||||
|
||||
@ -27,6 +27,7 @@ class KefuAuthTokenMiddleware implements MiddlewareInterface
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
@ -34,7 +35,6 @@ class KefuAuthTokenMiddleware implements MiddlewareInterface
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next)
|
||||
{
|
||||
$authInfo = null;
|
||||
$token = trim(ltrim($request->header(Config::get('cookie.token_name', 'Authori-zation')), 'Bearer'));
|
||||
/** @var LoginServices $services */
|
||||
$services = app()->make(LoginServices::class);
|
||||
|
||||
@ -28,6 +28,7 @@ class AuthTokenMiddleware implements MiddlewareInterface
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user