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