From b06a5300cbad6a87d8a025218e4544b45b6555c5 Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Mon, 20 Jan 2020 14:38:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=99=BB=E5=BD=95=E9=80=80?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/CatchAuth.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extend/catcher/CatchAuth.php b/extend/catcher/CatchAuth.php index 50043ea..32b5a1d 100644 --- a/extend/catcher/CatchAuth.php +++ b/extend/catcher/CatchAuth.php @@ -80,11 +80,19 @@ class CatchAuth /** * * @time 2020年01月07日 - * @return void + * @return mixed */ public function logout() { - + switch ($this->getDriver()) { + case 'jwt': + return true; + case 'session': + Session::delete($this->sessionUserKey()); + return true; + default: + throw new FailedException('user not found'); + } } /**