mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
重构API
This commit is contained in:
@@ -77,7 +77,7 @@ public class SaQuickBean implements WebMvcConfigurer {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 抛出异常,不再继续执行
|
||||
throw NotLoginException.newInstance(StpUtil.getLoginKey(), "");
|
||||
throw NotLoginException.newInstance(StpUtil.getLoginType(), "");
|
||||
}
|
||||
|
||||
}).
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SaQuickController {
|
||||
// 密码校验
|
||||
SaQuickConfig config = SaQuickManager.getConfig();
|
||||
if(name.equals(config.getName()) && pwd.equals(config.getPwd())) {
|
||||
StpUtil.setLoginId(config.getName());
|
||||
StpUtil.login(config.getName());
|
||||
return getResult(200, "ok", StpUtil.getTokenInfo());
|
||||
} else {
|
||||
// 校验失败
|
||||
|
||||
Reference in New Issue
Block a user