This commit is contained in:
Michael Hoennig 2025-03-12 11:46:51 +01:00
parent cdede45caa
commit cf85966224

View File

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