晚上单点登录文档

This commit is contained in:
click33
2021-07-23 02:13:44 +08:00
parent cf93324053
commit bea2592dc9
5 changed files with 158 additions and 48 deletions

View File

@@ -1,18 +0,0 @@
package com.pj.satoken;
import org.springframework.stereotype.Component;
import cn.dev33.satoken.action.SaTokenActionDefaultImpl;
import cn.dev33.satoken.util.SaFoxUtil;
/**
* 继承Sa-Token行为Bean默认实现, 重写部分逻辑
*/
@Component
public class MySaTokenAction extends SaTokenActionDefaultImpl {
// 重写token生成策略
@Override
public String createToken(Object loginId, String loginType) {
return SaFoxUtil.getRandomString(60); // 随机60位字符串
}
}