mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
cleanup
This commit is contained in:
parent
9d535ed7a5
commit
0ac593bad3
@ -62,9 +62,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(
|
||||
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
validateAndNormalizeJwtSettings();
|
||||
|
||||
if (!jwtService.isJwtEnabled()) {
|
||||
if (!validateAndNormalizeJwtSettings() && !jwtService.isJwtEnabled()) {
|
||||
filterChain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
@ -114,7 +112,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
private void validateAndNormalizeJwtSettings() {
|
||||
private boolean validateAndNormalizeJwtSettings() {
|
||||
ApplicationProperties.Security.Jwt jwtProperties = securityProperties.getJwt();
|
||||
|
||||
boolean enableKeystore = jwtProperties.isEnableKeystore();
|
||||
@ -137,7 +135,11 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
jwtProperties.setEnableKeyRotation(false);
|
||||
jwtProperties.setEnableKeyCleanup(false);
|
||||
jwtProperties.setSecureCookie(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean apiKeyExists(HttpServletRequest request, HttpServletResponse response)
|
||||
|
Loading…
x
Reference in New Issue
Block a user