unauthenticated swagger-ui on- server-port and proper security filter integration into Spring Security #163

Merged
hsh-michaelhoennig merged 13 commits from feature/unauthenticated-swagger-ui-on-server-port into master 2025-03-17 12:59:53 +01:00
Showing only changes of commit cf85966224 - Show all commits

View File

@ -21,12 +21,12 @@ public class CasAuthenticationFilter extends OncePerRequestFilter {
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) {
final var authenticatedRequest = new AuthenticatedHttpServletRequestWrapper(request);
if (request.getHeader("Authorization") != null) {
final var authenticatedRequest = new AuthenticatedHttpServletRequestWrapper(request);
final var currentSubject = authenticator.authenticate(request);
authenticatedRequest.addHeader("current-subject", currentSubject);
}
filterChain.doFilter(authenticatedRequest, response);
}
filterChain.doFilter(request, response);
}
}