Skip to content

Commit 3f8503f

Browse files
committed
Deprecate AccessDecisionManager et al
Closes gh-11302
1 parent 983ca6e commit 3f8503f

File tree

71 files changed

+297
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+297
-34
lines changed

aspects/src/main/java/org/springframework/security/access/intercept/aspectj/aspect/AnnotationSecurityAspect.aj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,9 @@ import org.springframework.security.access.prepost.PreFilter;
3737
* @author Mike Wiesner
3838
* @author Luke Taylor
3939
* @since 3.1
40+
* @deprecated Use aspects in {@link org.springframework.security.authorization.method.aspectj} instead
4041
*/
42+
@Deprecated
4143
public aspect AnnotationSecurityAspect implements InitializingBean {
4244

4345
/**

config/src/main/java/org/springframework/security/config/annotation/method/configuration/EnableGlobalMethodSecurity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,9 @@
4343
*
4444
* @author Rob Winch
4545
* @since 3.2
46+
* @deprecated Use {@link EnableMethodSecurity} instead
4647
*/
48+
@Deprecated
4749
@Retention(RetentionPolicy.RUNTIME)
4850
@Target(ElementType.TYPE)
4951
@Documented

config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityAspectJAutoProxyRegistrar.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,9 @@
3636
*
3737
* @author Rob Winch
3838
* @since 3.2
39+
* @deprecated Use {@link EnableMethodSecurity} instead
3940
*/
41+
@Deprecated
4042
class GlobalMethodSecurityAspectJAutoProxyRegistrar implements ImportBeanDefinitionRegistrar {
4143

4244
/**

config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@
8686
* @author Eddú Meléndez
8787
* @since 3.2
8888
* @see EnableGlobalMethodSecurity
89+
* @deprecated Use {@link PrePostMethodSecurityConfiguration},
90+
* {@link SecuredMethodSecurityConfiguration}, or
91+
* {@link Jsr250MethodSecurityConfiguration} instead
8992
*/
93+
@Deprecated
9094
@Configuration(proxyBeanMethods = false)
9195
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
9296
public class GlobalMethodSecurityConfiguration implements ImportAware, SmartInitializingSingleton, BeanFactoryAware {

config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecuritySelector.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,7 +34,9 @@
3434
*
3535
* @author Rob Winch
3636
* @since 3.2
37+
* @deprecated Use {@link MethodSecuritySelector} instead
3738
*/
39+
@Deprecated
3840
final class GlobalMethodSecuritySelector implements ImportSelector {
3941

4042
@Override

config/src/main/java/org/springframework/security/config/annotation/method/configuration/Jsr250MetadataSourceConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424

2525
@Configuration(proxyBeanMethods = false)
2626
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
27+
@Deprecated
2728
class Jsr250MetadataSourceConfiguration {
2829

2930
@Bean

config/src/main/java/org/springframework/security/config/annotation/method/configuration/MethodSecurityMetadataSourceAdvisorRegistrar.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,9 @@
3232
* @author Rob Winch
3333
* @since 4.0.2
3434
* @see GlobalMethodSecuritySelector
35+
* @deprecated Use {@link MethodSecuritySelector} instead
3536
*/
37+
@Deprecated
3638
class MethodSecurityMetadataSourceAdvisorRegistrar implements ImportBeanDefinitionRegistrar {
3739

3840
/**

config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,10 @@ public HttpSecurity rememberMe(Customizer<RememberMeConfigurer<HttpSecurity>> re
12811281
* </pre>
12821282
* @return the {@link ExpressionUrlAuthorizationConfigurer} for further customizations
12831283
* @throws Exception
1284+
* @deprecated Use {@link #authorizeHttpRequests()} instead
12841285
* @see #requestMatcher(RequestMatcher)
12851286
*/
1287+
@Deprecated
12861288
public ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry authorizeRequests()
12871289
throws Exception {
12881290
ApplicationContext context = getContext();
@@ -1395,8 +1397,10 @@ public ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrl
13951397
* for the {@link ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry}
13961398
* @return the {@link HttpSecurity} for further customizations
13971399
* @throws Exception
1400+
* @deprecated Use {@link #authorizeHttpRequests} instead
13981401
* @see #requestMatcher(RequestMatcher)
13991402
*/
1403+
@Deprecated
14001404
public HttpSecurity authorizeRequests(
14011405
Customizer<ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry> authorizeRequestsCustomizer)
14021406
throws Exception {

config/src/main/java/org/springframework/security/config/annotation/web/configurers/AbstractInterceptUrlConfigurer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
* @since 3.2
6161
* @see ExpressionUrlAuthorizationConfigurer
6262
* @see UrlAuthorizationConfigurer
63+
* @deprecated Use {@link AuthorizeHttpRequestsConfigurer} instead
6364
*/
65+
@Deprecated
6466
public abstract class AbstractInterceptUrlConfigurer<C extends AbstractInterceptUrlConfigurer<C, H>, H extends HttpSecurityBuilder<H>>
6567
extends AbstractHttpConfigurer<C, H> {
6668

config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,7 +79,9 @@
7979
* @author Yanming Zhou
8080
* @since 3.2
8181
* @see org.springframework.security.config.annotation.web.builders.HttpSecurity#authorizeRequests()
82+
* @deprecated Use {@link AuthorizeHttpRequestsConfigurer} instead
8283
*/
84+
@Deprecated
8385
public final class ExpressionUrlAuthorizationConfigurer<H extends HttpSecurityBuilder<H>>
8486
extends AbstractInterceptUrlConfigurer<ExpressionUrlAuthorizationConfigurer<H>, H> {
8587

0 commit comments

Comments
 (0)