From e99e2a9f0964b90abbc72dbceb818c67dcc0fd0a Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Tue, 10 Oct 2017 14:21:33 -0500 Subject: [PATCH] PrePostAdviceMethodInterceptor->PrePostAdviceReactiveMethodInterceptor Issue gh-4615 --- .../configuration/ReactiveMethodSecurityConfiguration.java | 6 +++--- ...tor.java => PrePostAdviceReactiveMethodInterceptor.java} | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) rename core/src/main/java/org/springframework/security/access/method/{PrePostAdviceMethodInterceptor.java => PrePostAdviceReactiveMethodInterceptor.java} (95%) diff --git a/config/src/main/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfiguration.java b/config/src/main/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfiguration.java index 10ced79c74..38c2abf288 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfiguration.java +++ b/config/src/main/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.security.access.expression.method.*; import org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor; import org.springframework.security.access.method.AbstractMethodSecurityMetadataSource; import org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource; -import org.springframework.security.access.method.PrePostAdviceMethodInterceptor; +import org.springframework.security.access.method.PrePostAdviceReactiveMethodInterceptor; import org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource; import java.util.Arrays; @@ -58,14 +58,14 @@ class ReactiveMethodSecurityConfiguration implements ImportAware { } @Bean - public PrePostAdviceMethodInterceptor securityMethodInterceptor(AbstractMethodSecurityMetadataSource source, MethodSecurityExpressionHandler handler) { + public PrePostAdviceReactiveMethodInterceptor securityMethodInterceptor(AbstractMethodSecurityMetadataSource source, MethodSecurityExpressionHandler handler) { ExpressionBasedPostInvocationAdvice postAdvice = new ExpressionBasedPostInvocationAdvice( handler); ExpressionBasedPreInvocationAdvice preAdvice = new ExpressionBasedPreInvocationAdvice(); preAdvice.setExpressionHandler(handler); - PrePostAdviceMethodInterceptor result = new PrePostAdviceMethodInterceptor(source); + PrePostAdviceReactiveMethodInterceptor result = new PrePostAdviceReactiveMethodInterceptor(source); result.setPostAdvice(postAdvice); result.setPreAdvice(preAdvice); return result; diff --git a/core/src/main/java/org/springframework/security/access/method/PrePostAdviceMethodInterceptor.java b/core/src/main/java/org/springframework/security/access/method/PrePostAdviceReactiveMethodInterceptor.java similarity index 95% rename from core/src/main/java/org/springframework/security/access/method/PrePostAdviceMethodInterceptor.java rename to core/src/main/java/org/springframework/security/access/method/PrePostAdviceReactiveMethodInterceptor.java index 11f5962156..fe6ee08be0 100644 --- a/core/src/main/java/org/springframework/security/access/method/PrePostAdviceMethodInterceptor.java +++ b/core/src/main/java/org/springframework/security/access/method/PrePostAdviceReactiveMethodInterceptor.java @@ -25,7 +25,6 @@ import org.springframework.security.access.expression.method.DefaultMethodSecuri import org.springframework.security.access.expression.method.ExpressionBasedPostInvocationAdvice; import org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice; import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; -import org.springframework.security.access.method.MethodSecurityMetadataSource; import org.springframework.security.access.prepost.PostInvocationAttribute; import org.springframework.security.access.prepost.PostInvocationAuthorizationAdvice; import org.springframework.security.access.prepost.PreInvocationAttribute; @@ -46,7 +45,7 @@ import java.util.Collection; * @author Rob Winch * @since 5.0 */ -public class PrePostAdviceMethodInterceptor implements MethodInterceptor { +public class PrePostAdviceReactiveMethodInterceptor implements MethodInterceptor { private Authentication anonymous = new AnonymousAuthenticationToken("key", "anonymous", AuthorityUtils.createAuthorityList("ROLE_ANONYMOUS")); @@ -56,7 +55,7 @@ public class PrePostAdviceMethodInterceptor implements MethodInterceptor { private PreInvocationAuthorizationAdvice preAdvice; - public PrePostAdviceMethodInterceptor(MethodSecurityMetadataSource attributeSource) { + public PrePostAdviceReactiveMethodInterceptor(MethodSecurityMetadataSource attributeSource) { this.attributeSource = attributeSource; MethodSecurityExpressionHandler handler = new DefaultMethodSecurityExpressionHandler();