新增登录退出
This commit is contained in:
parent
1a03783d26
commit
b06a5300cb
@ -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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user