新增登录退出

This commit is contained in:
wuyanwen 2020-01-20 14:38:50 +08:00
parent 1a03783d26
commit b06a5300cb

View File

@ -80,11 +80,19 @@ class CatchAuth
/** /**
* *
* @time 2020年01月07日 * @time 2020年01月07日
* @return void * @return mixed
*/ */
public function logout() 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');
}
} }
/** /**