<?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($TA9FP, \Closure $Hjh41) { goto fRMZ5; OASDj: if (empty($nlOSA)) { if (is_subclass_of($xEfX6, MemberLoginCheck::class)) { if (property_exists($xEfX6, 'memberLoginCheckIgnores') && is_array($xEfX6::$memberLoginCheckIgnores) && in_array($S6sAJ, $xEfX6::$memberLoginCheckIgnores)) { } else { return Response::json(ResponseCodes::LOGIN_REQUIRED, '请登录', null, modstart_web_url('login', array('redirect' => Request::currentPageUrl()))); } } } goto ZX9tE; O07Ph: return $Hjh41($TA9FP); goto ZugZz; EVfTh: Session::flash('_memberUser', $KAIwS); goto O07Ph; uJiue: $nlOSA = intval(Session::get('memberUserId', 0)); goto iL7Py; ZX9tE: Session::put('memberUserId', $nlOSA); goto EVfTh; JjhRI: if ($nlOSA && !$KAIwS) { $nlOSA = 0; Session::forget('memberUserId'); } goto OASDj; p97uE: if ($nlOSA) { goto kpUbO; R6oQy: if ($KAIwS) { switch ($KAIwS['status']) { case MemberStatus::FORBIDDEN: $KAIwS = null; break; } if ($KAIwS['isDeleted']) { $KAIwS = null; } } goto SqEdV; kpUbO: $KAIwS = MemberUtil::get($nlOSA); goto nlUP0; nlUP0: MemberUtil::processDefault($KAIwS); goto R6oQy; SqEdV: } goto JjhRI; fRMZ5: list($xEfX6, $S6sAJ) = Request::getControllerAction(); goto uJiue; iL7Py: $KAIwS = null; goto p97uE; ZugZz: } }