Skip to content

Commit 2ad859a

Browse files
committed
Add Missing Deprecation Markers
1 parent 3f7f3da commit 2ad859a

18 files changed

+64
-0
lines changed

config/src/main/java/org/springframework/security/config/annotation/rsocket/PayloadInterceptorOrder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ public enum PayloadInterceptorOrder implements Ordered {
3333
/**
3434
* Where basic authentication is placed.
3535
* @see RSocketSecurity#basicAuthentication(Customizer)
36+
* @deprecated please see {@link PayloadInterceptorOrder#AUTHENTICATION}
3637
*/
38+
@Deprecated
3739
BASIC_AUTHENTICATION,
3840
/**
3941
* Where JWT based authentication is performed.
4042
* @see RSocketSecurity#jwt(Customizer)
43+
* @deprecated please see {@link PayloadInterceptorOrder#AUTHENTICATION}
4144
*/
45+
@Deprecated
4246
JWT_AUTHENTICATION,
4347
/**
4448
* A generic placeholder for other types of authentication.

config/src/main/java/org/springframework/security/config/method/MethodConfigUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.security.access.vote.AffirmativeBased;
2525
import org.springframework.security.access.vote.AuthenticatedVoter;
2626
import org.springframework.security.access.vote.RoleVoter;
27+
import org.springframework.security.authorization.AuthorizationManager;
2728
import org.springframework.security.config.BeanIds;
2829

2930
/**
@@ -32,7 +33,9 @@
3233
* @author Luke Taylor
3334
* @author Ben Alex
3435
* @author Rob Winch
36+
* @deprecated Please use {@link AuthorizationManager} instead
3537
*/
38+
@Deprecated
3639
abstract class MethodConfigUtils {
3740

3841
@SuppressWarnings("unchecked")

core/src/main/java/org/springframework/security/access/hierarchicalroles/RoleHierarchyUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ private RoleHierarchyUtils() {
4343
* @return a string representation of a role hierarchy
4444
* @throws IllegalArgumentException if roleHierarchyMap is null or empty or if a role
4545
* name is null or empty or if an implied role name(s) is null or empty
46+
* @deprecated please see {@link RoleHierarchyImpl#setHierarchy} deprecation notice
4647
*/
48+
@Deprecated
4749
public static String roleHierarchyFromMap(Map<String, List<String>> roleHierarchyMap) {
4850
Assert.notEmpty(roleHierarchyMap, "roleHierarchyMap cannot be empty");
4951
StringWriter result = new StringWriter();

core/src/main/java/org/springframework/security/access/intercept/NullRunAsManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
* functionality.
2929
*
3030
* @author Ben Alex
31+
* @deprecated please see {@link RunAsManager} deprecation notice
3132
*/
33+
@Deprecated
3234
final class NullRunAsManager implements RunAsManager {
3335

3436
@Override

core/src/main/java/org/springframework/security/authorization/method/PostAuthorizeReactiveAuthorizationManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ public PostAuthorizeReactiveAuthorizationManager(MethodSecurityExpressionHandler
5959
* not be resolved.
6060
* @param defaults - whether to resolve pre/post-authorization templates parameters
6161
* @since 6.3
62+
* @deprecated please use
63+
* {@link #setTemplateDefaults(AnnotationTemplateExpressionDefaults)}
6264
*/
65+
@Deprecated
6366
public void setTemplateDefaults(PrePostTemplateDefaults defaults) {
6467
this.registry.setTemplateDefaults(defaults);
6568
}

core/src/main/java/org/springframework/security/authorization/method/PostFilterAuthorizationReactiveMethodInterceptor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ public PostFilterAuthorizationReactiveMethodInterceptor(MethodSecurityExpression
7474
* not be resolved.
7575
* @param defaults - whether to resolve pre/post-authorization templates parameters
7676
* @since 6.3
77+
* @deprecated please use
78+
* {@link #setTemplateDefaults(AnnotationTemplateExpressionDefaults)}
7779
*/
80+
@Deprecated
7881
public void setTemplateDefaults(PrePostTemplateDefaults defaults) {
7982
this.registry.setTemplateDefaults(defaults);
8083
}

core/src/main/java/org/springframework/security/authorization/method/PreAuthorizeReactiveAuthorizationManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ public PreAuthorizeReactiveAuthorizationManager(MethodSecurityExpressionHandler
5959
* not be resolved.
6060
* @param defaults - whether to resolve pre/post-authorization templates parameters
6161
* @since 6.3
62+
* @deprecated please use
63+
* {@link #setTemplateDefaults(AnnotationTemplateExpressionDefaults)}
6264
*/
65+
@Deprecated
6366
public void setTemplateDefaults(PrePostTemplateDefaults defaults) {
6467
this.registry.setTemplateDefaults(defaults);
6568
}

core/src/main/java/org/springframework/security/authorization/method/PreFilterAuthorizationReactiveMethodInterceptor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ public PreFilterAuthorizationReactiveMethodInterceptor(MethodSecurityExpressionH
7777
* not be resolved.
7878
* @param defaults - whether to resolve pre/post-authorization templates parameters
7979
* @since 6.3
80+
* @deprecated please use
81+
* {@link #setTemplateDefaults(AnnotationTemplateExpressionDefaults)}
8082
*/
83+
@Deprecated
8184
public void setTemplateDefaults(PrePostTemplateDefaults defaults) {
8285
this.registry.setTemplateDefaults(defaults);
8386
}

rsocket/src/main/java/org/springframework/security/rsocket/authentication/BasicAuthenticationPayloadExchangeConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
*
3737
* @author Rob Winch
3838
* @since 5.2
39+
* @deprecated please use {@link AuthenticationPayloadExchangeConverter} instead
3940
*/
41+
@Deprecated
4042
public class BasicAuthenticationPayloadExchangeConverter implements PayloadExchangeAuthenticationConverter {
4143

4244
private MimeType metadataMimetype = MimeTypeUtils

rsocket/src/main/java/org/springframework/security/rsocket/authentication/BearerPayloadExchangeConverter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
*
3535
* @author Rob Winch
3636
* @since 5.2
37+
* @deprecated please use {@link AuthenticationPayloadExchangeConverter} instead
3738
*/
39+
@Deprecated
3840
public class BearerPayloadExchangeConverter implements PayloadExchangeAuthenticationConverter {
3941

4042
private static final String BEARER_MIME_TYPE_VALUE = BearerTokenMetadata.BEARER_AUTHENTICATION_MIME_TYPE.toString();

web/src/main/java/org/springframework/security/web/access/channel/AbstractRetryEntryPoint.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434

3535
/**
3636
* @author Luke Taylor
37+
* @deprecated please use
38+
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
39+
* associated {@link PortMapper}
3740
*/
41+
@Deprecated
3842
public abstract class AbstractRetryEntryPoint implements ChannelEntryPoint {
3943

4044
protected final Log logger = LogFactory.getLog(getClass());

web/src/main/java/org/springframework/security/web/access/channel/ChannelEntryPoint.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import jakarta.servlet.http.HttpServletRequest;
2323
import jakarta.servlet.http.HttpServletResponse;
2424

25+
import org.springframework.security.web.PortMapper;
26+
2527
/**
2628
* May be used by a {@link ChannelProcessor} to launch a web channel.
2729
*
@@ -31,7 +33,11 @@
3133
* interface to assist <code>ChannelProcessor</code>s in performing this delegation.
3234
*
3335
* @author Ben Alex
36+
* @deprecated please use
37+
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
38+
* associated {@link PortMapper}
3439
*/
40+
@Deprecated
3541
public interface ChannelEntryPoint {
3642

3743
/**

web/src/main/java/org/springframework/security/web/access/channel/RetryWithHttpEntryPoint.java

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

1717
package org.springframework.security.web.access.channel;
1818

19+
import org.springframework.security.web.PortMapper;
20+
1921
/**
2022
* Commences an insecure channel by retrying the original request using HTTP.
2123
* <p>
@@ -24,7 +26,11 @@
2426
* issue.
2527
*
2628
* @author Ben Alex
29+
* @deprecated please use
30+
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
31+
* associated {@link PortMapper}
2732
*/
33+
@Deprecated(since = "6.5")
2834
public class RetryWithHttpEntryPoint extends AbstractRetryEntryPoint {
2935

3036
public RetryWithHttpEntryPoint() {

web/src/main/java/org/springframework/security/web/access/channel/RetryWithHttpsEntryPoint.java

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

1717
package org.springframework.security.web.access.channel;
1818

19+
import org.springframework.security.web.PortMapper;
20+
1921
/**
2022
* Commences a secure channel by retrying the original request using HTTPS.
2123
* <p>
@@ -25,7 +27,11 @@
2527
* </p>
2628
*
2729
* @author Ben Alex
30+
* @deprecated please use
31+
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
32+
* associated {@link PortMapper}
2833
*/
34+
@Deprecated(since = "6.5")
2935
public class RetryWithHttpsEntryPoint extends AbstractRetryEntryPoint {
3036

3137
public RetryWithHttpsEntryPoint() {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ public DelegatingSecurityContextRepository(List<SecurityContextRepository> deleg
4444
this.delegates = delegates;
4545
}
4646

47+
/**
48+
* @deprecated
49+
* @see SecurityContextRepository#loadContext
50+
*/
4751
@Override
52+
@Deprecated
4853
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
4954
SecurityContext result = null;
5055
for (SecurityContextRepository delegate : this.delegates) {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
115115
* If the session is null, the context object is null or the context object stored in
116116
* the session is not an instance of {@code SecurityContext}, a new context object
117117
* will be generated and returned.
118+
* @deprecated please see {@link SecurityContextRepository#loadContext}
118119
*/
120+
@Deprecated
119121
@Override
120122
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
121123
HttpServletRequest request = requestResponseHolder.getRequest();

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public boolean containsContext(HttpServletRequest request) {
3838
return false;
3939
}
4040

41+
/**
42+
* @deprecated please see {@link SecurityContextRepository#loadContext}
43+
*/
4144
@Override
45+
@Deprecated
4246
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
4347
return this.securityContextHolderStrategy.createEmptyContext();
4448
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ public boolean containsContext(HttpServletRequest request) {
7575
return getContext(request) != null;
7676
}
7777

78+
/**
79+
* @deprecated please see {@link SecurityContextRepository#loadContext}
80+
*/
7881
@Override
82+
@Deprecated
7983
public SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder) {
8084
return loadDeferredContext(requestResponseHolder.getRequest()).get();
8185
}

0 commit comments

Comments
 (0)