|
|
|
@ -26,6 +26,7 @@ import org.springframework.context.annotation.AutoProxyRegistrar; |
|
|
|
import org.springframework.context.annotation.ImportSelector; |
|
|
|
import org.springframework.context.annotation.ImportSelector; |
|
|
|
import org.springframework.core.type.AnnotationMetadata; |
|
|
|
import org.springframework.core.type.AnnotationMetadata; |
|
|
|
import org.springframework.lang.NonNull; |
|
|
|
import org.springframework.lang.NonNull; |
|
|
|
|
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author Rob Winch |
|
|
|
* @author Rob Winch |
|
|
|
@ -34,6 +35,9 @@ import org.springframework.lang.NonNull; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class ReactiveMethodSecuritySelector implements ImportSelector { |
|
|
|
class ReactiveMethodSecuritySelector implements ImportSelector { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final boolean isDataPresent = ClassUtils |
|
|
|
|
|
|
|
.isPresent("org.springframework.security.data.aot.hint.AuthorizeReturnObjectDataHintsRegistrar", null); |
|
|
|
|
|
|
|
|
|
|
|
private final ImportSelector autoProxy = new AutoProxyRegistrarSelector(); |
|
|
|
private final ImportSelector autoProxy = new AutoProxyRegistrarSelector(); |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -51,6 +55,9 @@ class ReactiveMethodSecuritySelector implements ImportSelector { |
|
|
|
else { |
|
|
|
else { |
|
|
|
imports.add(ReactiveMethodSecurityConfiguration.class.getName()); |
|
|
|
imports.add(ReactiveMethodSecurityConfiguration.class.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (isDataPresent) { |
|
|
|
|
|
|
|
imports.add(AuthorizationProxyDataConfiguration.class.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
imports.add(AuthorizationProxyConfiguration.class.getName()); |
|
|
|
imports.add(AuthorizationProxyConfiguration.class.getName()); |
|
|
|
return imports.toArray(new String[0]); |
|
|
|
return imports.toArray(new String[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
|