提交 fa492ab3 编写于 作者: zhouweidong's avatar zhouweidong

更改为spring util

上级 b4ed7141
......@@ -14,7 +14,6 @@ package ${pub.getPKGCodeName()}.util.security;
import io.jsonwebtoken.ExpiredJwtException;
import lombok.extern.slf4j.Slf4j;
import ${pub.getPKGCodeName()}.util.service.AuthenticationUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
......@@ -81,7 +80,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
<#if sys.getSaaSMode()==4>
final String requestOrgId = request.getHeader("srforgid");
if(StringUtils.isBlank(requestOrgId)){
if(StringUtils.isEmpty(requestOrgId)){
throw new RuntimeException("无效系统标识");
}
UserDetails userDetails = this.userDetailsService.loadUserByUsername("${sys.getCodeName()}",requestOrgId,username);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册