package doumeemes.config.shiroMemory;
|
|
import doumeemes.core.exception.UnSafeSessionException;
|
|
import java.util.UUID;
|
|
/**
|
* 默认Token管理器
|
* @author Eva.Caesar Liu
|
* @date 2022/04/18 18:12
|
*/
|
//@Component
|
public class ShiroTokenManager {
|
|
String build() {
|
return UUID.randomUUID().toString();
|
}
|
|
void check(String token) throws UnSafeSessionException {
|
if (token == null || token.length() != 36) {
|
throw new UnSafeSessionException();
|
}
|
}
|
}
|