修正security filter

This commit is contained in:
ajaxfan
2021-05-10 16:57:53 +08:00
parent b52a865416
commit e9cb9ea2b9

View File

@ -66,7 +66,7 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
if (StringUtils.startsWith(header, Constants.TOKEN_PREFIX)) {
setAuthentication(currentRoleCode, RegExUtils.replaceAll(header, Constants.TOKEN_PREFIX, ""));// 移除header的前缀提取出token字串
}
// 检查cookie
// 检查cookie
else {
Optional.ofNullable(request.getCookies())
.ifPresent(cookies -> Stream.of(cookies)