<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Middleware; use Illuminate\Support\Facades\Session; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use Module\Member\Support\MemberLoginCheck; use Module\Member\Type\MemberStatus; use Module\Member\Util\MemberUtil; use Module\Vendor\Support\ResponseCodes; class ApiAuthMiddleware { public function handle($WeAjq, \Closure $fea_j) { goto x5rwc; Yz3X3: return $fea_j($WeAjq); goto FDWuN; tQab0: if ($shbIl && !$QqUVI) { $shbIl = 0; Session::forget('memberUserId'); } goto eg3is; NyYBs: Session::put('memberUserId', $shbIl); goto hEkPj; qXFOT: if ($shbIl) { goto HkM3a; IefSu: if ($QqUVI) { switch ($QqUVI['status']) { case MemberStatus::FORBIDDEN: $QqUVI = null; break; } if ($QqUVI['isDeleted']) { $QqUVI = null; } } goto U6llR; HkM3a: $QqUVI = MemberUtil::get($shbIl); goto mjzge; mjzge: MemberUtil::processDefault($QqUVI); goto IefSu; U6llR: } goto tQab0; eg3is: if (empty($shbIl)) { if (is_subclass_of($xyZf_, MemberLoginCheck::class)) { if (property_exists($xyZf_, 'memberLoginCheckIgnores') && is_array($xyZf_::$memberLoginCheckIgnores) && in_array($O2USQ, $xyZf_::$memberLoginCheckIgnores)) { } else { return Response::json(ResponseCodes::LOGIN_REQUIRED, '请登录', null, modstart_web_url('login', array('redirect' => Request::currentPageUrl()))); } } } goto NyYBs; J5HB0: $shbIl = intval(Session::get('memberUserId', 0)); goto GQ9Hf; x5rwc: list($xyZf_, $O2USQ) = Request::getControllerAction(); goto J5HB0; GQ9Hf: $QqUVI = null; goto qXFOT; hEkPj: Session::flash('_memberUser', $QqUVI); goto Yz3X3; FDWuN: } }