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 7a4dadea73 - Show all commits

View File

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