mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-21 02:57:23 +08:00
StpUtil.logoutByTokenValue API的文档说明
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package com.pj;
|
package com.pj;
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@@ -16,3 +16,10 @@
|
|||||||
StpUtil.logoutByLoginId(10001);
|
StpUtil.logoutByLoginId(10001);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### StpUtil.logoutByTokenValue(String tokenValue);
|
||||||
|
你还可以让指定token的会话注销登录 (此方法直接删除了`token->uid`的映射关系,对方再次访问时提示:`token无效`,场景值为-2)
|
||||||
|
``` java
|
||||||
|
// 使账号id为10001的会话注销登录
|
||||||
|
StpUtil.logoutByTokenValue("xxxx-xxxx-xxxx-xxxx-xxxx");
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user