Add Missing Deprecation Markers

This commit is contained in:
Josh Cummings
2025-04-22 13:37:40 -06:00
parent 3f7f3dabe7
commit 2ad859a63c
18 changed files with 64 additions and 0 deletions

View File

@@ -34,7 +34,11 @@ import org.springframework.util.Assert;
/**
* @author Luke Taylor
* @deprecated please use
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
* associated {@link PortMapper}
*/
@Deprecated
public abstract class AbstractRetryEntryPoint implements ChannelEntryPoint {
protected final Log logger = LogFactory.getLog(getClass());

View File

@@ -22,6 +22,8 @@ import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.web.PortMapper;
/**
* May be used by a {@link ChannelProcessor} to launch a web channel.
*
@@ -31,7 +33,11 @@ import jakarta.servlet.http.HttpServletResponse;
* interface to assist <code>ChannelProcessor</code>s in performing this delegation.
*
* @author Ben Alex
* @deprecated please use
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
* associated {@link PortMapper}
*/
@Deprecated
public interface ChannelEntryPoint {
/**

View File

@@ -16,6 +16,8 @@
package org.springframework.security.web.access.channel;
import org.springframework.security.web.PortMapper;
/**
* Commences an insecure channel by retrying the original request using HTTP.
* <p>
@@ -24,7 +26,11 @@ package org.springframework.security.web.access.channel;
* issue.
*
* @author Ben Alex
* @deprecated please use
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
* associated {@link PortMapper}
*/
@Deprecated(since = "6.5")
public class RetryWithHttpEntryPoint extends AbstractRetryEntryPoint {
public RetryWithHttpEntryPoint() {

View File

@@ -16,6 +16,8 @@
package org.springframework.security.web.access.channel;
import org.springframework.security.web.PortMapper;
/**
* Commences a secure channel by retrying the original request using HTTPS.
* <p>
@@ -25,7 +27,11 @@ package org.springframework.security.web.access.channel;
* </p>
*
* @author Ben Alex
* @deprecated please use
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
* associated {@link PortMapper}
*/
@Deprecated(since = "6.5")
public class RetryWithHttpsEntryPoint extends AbstractRetryEntryPoint {
public RetryWithHttpsEntryPoint() {

View File

@@ -44,7 +44,12 @@ public final class DelegatingSecurityContextRepository implements SecurityContex
this.delegates = delegates;
}
/**
* @deprecated
* @see SecurityContextRepository#loadContext
*/
@Override
@Deprecated
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
SecurityContext result = null;
for (SecurityContextRepository delegate : this.delegates) {

View File

@@ -115,7 +115,9 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
* If the session is null, the context object is null or the context object stored in
* the session is not an instance of {@code SecurityContext}, a new context object
* will be generated and returned.
* @deprecated please see {@link SecurityContextRepository#loadContext}
*/
@Deprecated
@Override
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
HttpServletRequest request = requestResponseHolder.getRequest();

View File

@@ -38,7 +38,11 @@ public final class NullSecurityContextRepository implements SecurityContextRepos
return false;
}
/**
* @deprecated please see {@link SecurityContextRepository#loadContext}
*/
@Override
@Deprecated
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
return this.securityContextHolderStrategy.createEmptyContext();
}

View File

@@ -75,7 +75,11 @@ public final class RequestAttributeSecurityContextRepository implements Security
return getContext(request) != null;
}
/**
* @deprecated please see {@link SecurityContextRepository#loadContext}
*/
@Override
@Deprecated
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
return loadDeferredContext(requestResponseHolder.getRequest()).get();
}