1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Clarify Nullability on Saml2AuthenticationRequestRepository

Issue gh-17823

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
This commit is contained in:
Josh Cummings
2026-03-11 16:51:48 -06:00
parent ddb825f7a5
commit 266d2608f1
3 changed files with 4 additions and 6 deletions
@@ -51,7 +51,7 @@ public final class CacheSaml2AuthenticationRequestRepository
} }
@Override @Override
public void saveAuthenticationRequest(@Nullable AbstractSaml2AuthenticationRequest authenticationRequest, public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest,
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response) {
Assert.notNull(authenticationRequest, "authenticationRequest must not be null"); Assert.notNull(authenticationRequest, "authenticationRequest must not be null");
String relayState = request.getParameter(Saml2ParameterNames.RELAY_STATE); String relayState = request.getParameter(Saml2ParameterNames.RELAY_STATE);
@@ -50,7 +50,7 @@ public class HttpSessionSaml2AuthenticationRequestRepository
} }
@Override @Override
public void saveAuthenticationRequest(@Nullable AbstractSaml2AuthenticationRequest authenticationRequest, public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest,
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response) {
if (authenticationRequest == null) { if (authenticationRequest == null) {
removeAuthenticationRequest(request, response); removeAuthenticationRequest(request, response);
@@ -42,13 +42,11 @@ public interface Saml2AuthenticationRequestRepository<T extends AbstractSaml2Aut
/** /**
* Saves the current authentication request using the {@link HttpServletRequest} and * Saves the current authentication request using the {@link HttpServletRequest} and
* {@link HttpServletResponse} * {@link HttpServletResponse}
* @param authenticationRequest the {@link AbstractSaml2AuthenticationRequest}, if * @param authenticationRequest the {@link AbstractSaml2AuthenticationRequest}
* {@code null}, then remove
* @param request the current request * @param request the current request
* @param response the current response * @param response the current response
*/ */
void saveAuthenticationRequest(@Nullable T authenticationRequest, HttpServletRequest request, void saveAuthenticationRequest(T authenticationRequest, HttpServletRequest request, HttpServletResponse response);
HttpServletResponse response);
/** /**
* Removes the authentication request using the {@link HttpServletRequest} and * Removes the authentication request using the {@link HttpServletRequest} and