From 266d2608f1bad9f1a8deae8f2c9ea3b9be866ee2 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:51:48 -0600 Subject: [PATCH] Clarify Nullability on Saml2AuthenticationRequestRepository Issue gh-17823 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .../web/CacheSaml2AuthenticationRequestRepository.java | 2 +- .../HttpSessionSaml2AuthenticationRequestRepository.java | 2 +- .../service/web/Saml2AuthenticationRequestRepository.java | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java index 30938c35fb..c53f7004d4 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java @@ -51,7 +51,7 @@ public final class CacheSaml2AuthenticationRequestRepository } @Override - public void saveAuthenticationRequest(@Nullable AbstractSaml2AuthenticationRequest authenticationRequest, + public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest, HttpServletRequest request, HttpServletResponse response) { Assert.notNull(authenticationRequest, "authenticationRequest must not be null"); String relayState = request.getParameter(Saml2ParameterNames.RELAY_STATE); diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/HttpSessionSaml2AuthenticationRequestRepository.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/HttpSessionSaml2AuthenticationRequestRepository.java index 8ff8a324e9..087ade40f2 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/HttpSessionSaml2AuthenticationRequestRepository.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/HttpSessionSaml2AuthenticationRequestRepository.java @@ -50,7 +50,7 @@ public class HttpSessionSaml2AuthenticationRequestRepository } @Override - public void saveAuthenticationRequest(@Nullable AbstractSaml2AuthenticationRequest authenticationRequest, + public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest, HttpServletRequest request, HttpServletResponse response) { if (authenticationRequest == null) { removeAuthenticationRequest(request, response); diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/Saml2AuthenticationRequestRepository.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/Saml2AuthenticationRequestRepository.java index 014d699635..b9219c076f 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/Saml2AuthenticationRequestRepository.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/Saml2AuthenticationRequestRepository.java @@ -42,13 +42,11 @@ public interface Saml2AuthenticationRequestRepository