As part of a site we have a login/subscription model that will restict content visibility to the end users.
We want to implement this as a paywall (lead-in) functionality. i.e. when i am logged out/web crawler/logged in but not with the right subscription, then you only see a small portion of the content on the page so that the site can still be crawled by
We want to do this in a way that the page in AEM has all of the content that can be visible, and we want to make using of dispatcher caching of the content.
We don't want to use a javascript function to hide the content as you can inspect the spite, or view page source to get the entire content which will violate the subscription model.
Is there any way within the dispatcher of caching different versions based on the users access, or a way to have a cached response based on the cug groups.
Views
Replies
Total Likes
You can achieve this using Sling Dynamic Include. Refer to this link for more details. Write the logic on the server side to validate if the user has the correct subscription.
Sling dynamic includes are not supported in AEMaaCS
Views
Replies
Total Likes
@taggatmerklewe are using them for years on AEMaaCS
You can handle this with dispatcher, based on login cookie rewrite page request with additional selector to show full content otherwise default content or vice-versa.
However you need to take care of any additional cache e.g. CDN or browser cache, in this case no-store, so that consumer always get page from dispatcher cache.
No, the solution doesn't meet our needs. In the end I am going for a microservice sitting in front of AEM which will handle the reduction of content to only what is public, removing anything that should only be available based on their subscription.
We will mark the content using the style systems so the microservice knows what to remove
Views
Replies
Total Likes
@taggatmerkle Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies