Merge pull request #3 from csaboka/SLING-3524
SLING-3524: Allow distinguishing cloning from normal login in providers.
diff --git a/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java b/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
index 7cf2dac..7089a01 100644
--- a/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
+++ b/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
@@ -210,6 +210,13 @@
public static final String AUTH_ADMIN = "provider.auth.admin";
/**
+ * The authentication information property indicating that an existing ResourceResolver is being cloned.
+ * Providers that receive stateful objects as authentication information must deep-clone those objects
+ * when this property is present, to avoid inadvertent state sharing with the existing resolver.
+ */
+ public static final String AUTH_CLONE = "provider.auth.clone";
+
+ /**
* The resource type be set on resources returned by the
* {@link #listChildren(ResolveContext, Resource)} method to enable traversing the
* resource