Clarify Nullability on Saml2AuthenticationRequestRepository
Issue gh-17823 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -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);
|
||||||
|
|||||||
+1
-1
@@ -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);
|
||||||
|
|||||||
+2
-4
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user