Deprecate loadContext(RequestResponseHolder)

Fix gh-11032
This commit is contained in:
Rob Winch 2022-04-05 16:02:23 -05:00
parent 147ab42440
commit 3a9b080bbe
4 changed files with 10 additions and 0 deletions

View File

@ -27,7 +27,9 @@ import javax.servlet.http.HttpServletResponse;
*
* @author Luke Taylor
* @since 3.0
* @deprecated Use {@link SecurityContextRepository#loadContext(HttpServletRequest)}
*/
@Deprecated
public final class HttpRequestResponseHolder {
private HttpServletRequest request;

View File

@ -16,6 +16,7 @@
package org.springframework.security.web.context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.core.context.SecurityContext;
@ -39,7 +40,10 @@ import org.springframework.security.web.util.OnCommittedResponseWrapper;
* @author Marten Algesten
* @author Rob Winch
* @since 3.0
* @deprecated Use {@link SecurityContextRepository#loadContext(HttpServletRequest)}
* instead.
*/
@Deprecated
public abstract class SaveContextOnUpdateOrErrorResponseWrapper extends OnCommittedResponseWrapper {
private boolean contextSaved = false;

View File

@ -57,7 +57,9 @@ import org.springframework.web.filter.GenericFilterBean;
*
* @author Luke Taylor
* @since 3.0
* @deprecated Use {@link SecurityContextHolderFilter}
*/
@Deprecated
public class SecurityContextPersistenceFilter extends GenericFilterBean {
static final String FILTER_APPLIED = "__spring_security_scpf_applied";

View File

@ -60,7 +60,9 @@ public interface SecurityContextRepository {
* the context should be loaded.
* @return The security context which should be used for the current request, never
* null.
* @deprecated Use {@link #loadContext(HttpServletRequest)} instead.
*/
@Deprecated
SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder);
/**