mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 21:42:17 +00:00
Deprecate ChannelSecurityConfigurer
Closes gh-16680
This commit is contained in:
parent
be23268c37
commit
72070cd191
@ -3137,7 +3137,9 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
|
|||||||
* the {@link ChannelSecurityConfigurer.ChannelRequestMatcherRegistry}
|
* the {@link ChannelSecurityConfigurer.ChannelRequestMatcherRegistry}
|
||||||
* @return the {@link HttpSecurity} for further customizations
|
* @return the {@link HttpSecurity} for further customizations
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
* @deprecated Use {@link #redirectToHttps}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public HttpSecurity requiresChannel(
|
public HttpSecurity requiresChannel(
|
||||||
Customizer<ChannelSecurityConfigurer<HttpSecurity>.ChannelRequestMatcherRegistry> requiresChannelCustomizer)
|
Customizer<ChannelSecurityConfigurer<HttpSecurity>.ChannelRequestMatcherRegistry> requiresChannelCustomizer)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
@ -78,7 +78,9 @@ import org.springframework.security.web.util.matcher.RequestMatcher;
|
|||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Onur Kagan Ozcan
|
* @author Onur Kagan Ozcan
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
|
* @deprecated please use {@link HttpsRedirectConfigurer} instead
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
||||||
extends AbstractHttpConfigurer<ChannelSecurityConfigurer<H>, H> {
|
extends AbstractHttpConfigurer<ChannelSecurityConfigurer<H>, H> {
|
||||||
|
|
||||||
@ -147,6 +149,10 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
return this.REGISTRY;
|
return this.REGISTRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated no replacement planned
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public final class ChannelRequestMatcherRegistry
|
public final class ChannelRequestMatcherRegistry
|
||||||
extends AbstractConfigAttributeRequestMatcherRegistry<RequiresChannelUrl> {
|
extends AbstractConfigAttributeRequestMatcherRegistry<RequiresChannelUrl> {
|
||||||
|
|
||||||
@ -215,6 +221,10 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated no replacement planned
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class RequiresChannelUrl {
|
public class RequiresChannelUrl {
|
||||||
|
|
||||||
protected List<? extends RequestMatcher> requestMatchers;
|
protected List<? extends RequestMatcher> requestMatchers;
|
||||||
|
@ -527,7 +527,9 @@ class HttpSecurityDsl(private val http: HttpSecurity, private val init: HttpSecu
|
|||||||
* @param requiresChannelConfiguration custom configuration that specifies
|
* @param requiresChannelConfiguration custom configuration that specifies
|
||||||
* channel security
|
* channel security
|
||||||
* @see [RequiresChannelDsl]
|
* @see [RequiresChannelDsl]
|
||||||
|
* @deprecated please use [redirectToHttps] instead
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(message="since 6.5 use redirectToHttps instead")
|
||||||
fun requiresChannel(requiresChannelConfiguration: RequiresChannelDsl.() -> Unit) {
|
fun requiresChannel(requiresChannelConfiguration: RequiresChannelDsl.() -> Unit) {
|
||||||
val requiresChannelCustomizer = RequiresChannelDsl().apply(requiresChannelConfiguration).get()
|
val requiresChannelCustomizer = RequiresChannelDsl().apply(requiresChannelConfiguration).get()
|
||||||
this.http.requiresChannel(requiresChannelCustomizer)
|
this.http.requiresChannel(requiresChannelCustomizer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user