Files
sa-token/sa-token-doc/doc/use/kick.md
2021-01-02 04:00:49 +08:00

17 lines
423 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 踢人下线
所谓踢人下线,核心操作就是找到其指定`loginId`的token并设置其失效
---
## 具体API
#### StpUtil.logoutByLoginId(Object loginId)
让指定loginId的会话注销登录踢人下线例如
``` java
// 使账号id为10001的会话注销登录待到10001再次访问系统时会抛出`NotLoginException`异常,场景值为-5
StpUtil.logoutByLoginId(10001);
```