OAuth2模块与会话登录模块 数据互通

This commit is contained in:
click33
2022-02-06 18:06:55 +08:00
parent 91d90dd901
commit 116f7d0976
9 changed files with 253 additions and 25 deletions

View File

@@ -136,6 +136,25 @@ public class StpUserUtil {
stpLogic.login(id, loginModel);
}
/**
* 创建指定账号id的登录会话
* @param id 登录id建议的类型long | int | String
* @return 返回会话令牌
*/
public static String createLoginSession(Object id) {
return stpLogic.createLoginSession(id);
}
/**
* 创建指定账号id的登录会话
* @param id 登录id建议的类型long | int | String
* @param loginModel 此次登录的参数Model
* @return 返回会话令牌
*/
public static String createLoginSession(Object id, SaLoginModel loginModel) {
return stpLogic.createLoginSession(id, loginModel);
}
// --- 注销
/**

View File

@@ -235,7 +235,6 @@ public class TestController {
return AjaxJson.getSuccessData("登录成功");
}
// 测试 浏览器访问: http://localhost:8081/test/test
@RequestMapping("test")
public AjaxJson test() {
@@ -248,5 +247,5 @@ public class TestController {
public AjaxJson test2() {
return AjaxJson.getSuccess();
}
}