Deprecate ChannelSecurityConfigurer

Closes gh-16680
This commit is contained in:
Josh Cummings 2025-02-28 09:12:53 -07:00
parent be23268c37
commit 72070cd191
No known key found for this signature in database
GPG Key ID: 869B37A20E876129
3 changed files with 14 additions and 0 deletions

View File

@ -3137,7 +3137,9 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* the {@link ChannelSecurityConfigurer.ChannelRequestMatcherRegistry}
* @return the {@link HttpSecurity} for further customizations
* @throws Exception
* @deprecated Use {@link #redirectToHttps}
*/
@Deprecated
public HttpSecurity requiresChannel(
Customizer<ChannelSecurityConfigurer<HttpSecurity>.ChannelRequestMatcherRegistry> requiresChannelCustomizer)
throws Exception {

View File

@ -78,7 +78,9 @@ import org.springframework.security.web.util.matcher.RequestMatcher;
* @author Rob Winch
* @author Onur Kagan Ozcan
* @since 3.2
* @deprecated please use {@link HttpsRedirectConfigurer} instead
*/
@Deprecated
public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<ChannelSecurityConfigurer<H>, H> {
@ -147,6 +149,10 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
return this.REGISTRY;
}
/**
* @deprecated no replacement planned
*/
@Deprecated
public final class ChannelRequestMatcherRegistry
extends AbstractConfigAttributeRequestMatcherRegistry<RequiresChannelUrl> {
@ -215,6 +221,10 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
}
/**
* @deprecated no replacement planned
*/
@Deprecated
public class RequiresChannelUrl {
protected List<? extends RequestMatcher> requestMatchers;

View File

@ -527,7 +527,9 @@ class HttpSecurityDsl(private val http: HttpSecurity, private val init: HttpSecu
* @param requiresChannelConfiguration custom configuration that specifies
* channel security
* @see [RequiresChannelDsl]
* @deprecated please use [redirectToHttps] instead
*/
@Deprecated(message="since 6.5 use redirectToHttps instead")
fun requiresChannel(requiresChannelConfiguration: RequiresChannelDsl.() -> Unit) {
val requiresChannelCustomizer = RequiresChannelDsl().apply(requiresChannelConfiguration).get()
this.http.requiresChannel(requiresChannelCustomizer)