Skip to content

Commit 3a9b080

Browse files
committed
Deprecate loadContext(RequestResponseHolder)
Fix gh-11032
1 parent 147ab42 commit 3a9b080

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

web/src/main/java/org/springframework/security/web/context/HttpRequestResponseHolder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
*
2828
* @author Luke Taylor
2929
* @since 3.0
30+
* @deprecated Use {@link SecurityContextRepository#loadContext(HttpServletRequest)}
3031
*/
32+
@Deprecated
3133
public final class HttpRequestResponseHolder {
3234

3335
private HttpServletRequest request;

web/src/main/java/org/springframework/security/web/context/SaveContextOnUpdateOrErrorResponseWrapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.security.web.context;
1818

19+
import javax.servlet.http.HttpServletRequest;
1920
import javax.servlet.http.HttpServletResponse;
2021

2122
import org.springframework.security.core.context.SecurityContext;
@@ -39,7 +40,10 @@
3940
* @author Marten Algesten
4041
* @author Rob Winch
4142
* @since 3.0
43+
* @deprecated Use {@link SecurityContextRepository#loadContext(HttpServletRequest)}
44+
* instead.
4245
*/
46+
@Deprecated
4347
public abstract class SaveContextOnUpdateOrErrorResponseWrapper extends OnCommittedResponseWrapper {
4448

4549
private boolean contextSaved = false;

web/src/main/java/org/springframework/security/web/context/SecurityContextPersistenceFilter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
*
5858
* @author Luke Taylor
5959
* @since 3.0
60+
* @deprecated Use {@link SecurityContextHolderFilter}
6061
*/
62+
@Deprecated
6163
public class SecurityContextPersistenceFilter extends GenericFilterBean {
6264

6365
static final String FILTER_APPLIED = "__spring_security_scpf_applied";

web/src/main/java/org/springframework/security/web/context/SecurityContextRepository.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public interface SecurityContextRepository {
6060
* the context should be loaded.
6161
* @return The security context which should be used for the current request, never
6262
* null.
63+
* @deprecated Use {@link #loadContext(HttpServletRequest)} instead.
6364
*/
65+
@Deprecated
6466
SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder);
6567

6668
/**

0 commit comments

Comments
 (0)