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
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);
@@ -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);
@@ -42,13 +42,11 @@ public interface Saml2AuthenticationRequestRepository<T extends AbstractSaml2Aut
/**
* Saves the current authentication request using the {@link HttpServletRequest} and
* {@link HttpServletResponse}
* @param authenticationRequest the {@link AbstractSaml2AuthenticationRequest}, if
* {@code null}, then remove
* @param authenticationRequest the {@link AbstractSaml2AuthenticationRequest}
* @param request the current request
* @param response the current response
*/
void saveAuthenticationRequest(@Nullable T authenticationRequest, HttpServletRequest request,
HttpServletResponse response);
void saveAuthenticationRequest(T authenticationRequest, HttpServletRequest request, HttpServletResponse response);
/**
* Removes the authentication request using the {@link HttpServletRequest} and