perf:请求时将通过getCurrentUserName()方法返回的对象检验用户是否非法
This commit is contained in:
@@ -1,33 +1,19 @@
|
||||
package com.tiesheng.web.service;
|
||||
|
||||
import cn.hutool.log.LogFactory;
|
||||
import com.tiesheng.web.pojos.RequestUserInfo;
|
||||
import com.tiesheng.web.pojos.dao.CoreConfigSystem;
|
||||
import com.tiesheng.web.pojos.dao.CorePlatformUnique;
|
||||
import com.tiesheng.util.pojos.TokenBean;
|
||||
import com.tiesheng.util.ServletKit;
|
||||
import com.tiesheng.login.service.TsLoginConfigurer;
|
||||
import com.tiesheng.util.exception.ApiRespEnum;
|
||||
import com.tiesheng.util.pojos.ApiResp;
|
||||
import com.tiesheng.web.pojos.dao.CoreConfigSystem;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* WEB配置
|
||||
* 核心配置
|
||||
*
|
||||
* @author hao
|
||||
*/
|
||||
public interface TieshengWebConfigurer {
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前用户的姓名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
RequestUserInfo getCurrentUserName(TokenBean userId);
|
||||
|
||||
|
||||
/**
|
||||
* 添加其他异常处理
|
||||
*
|
||||
@@ -75,28 +61,16 @@ public interface TieshengWebConfigurer {
|
||||
default void configSystemCheck(CoreConfigSystem configSystem) {
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 登录配置
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 登录逻辑
|
||||
* 登录配置
|
||||
*
|
||||
* @param platformUnique
|
||||
* @return
|
||||
*/
|
||||
TokenBean login(CorePlatformUnique platformUnique);
|
||||
TsLoginConfigurer configureLogin();
|
||||
|
||||
/**
|
||||
* 登录重定向
|
||||
*
|
||||
* @param bean
|
||||
* @param extra
|
||||
* @param response
|
||||
*/
|
||||
void redirect(TokenBean bean, String to, String extra, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 签名错误的时候
|
||||
*/
|
||||
default void onSignError(HttpServletResponse response) {
|
||||
ServletKit.write(response, "404", "text");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user