I added "-/libs/wcm/core/content/reference" in Authentication Requirements list, but it didn't work. I still need to login when I accessed this link.
Is there anyone who can assist me?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
authentication != authorization.
When you are not authenticated, then the system will consider you as the anonymous user; and if you invoke this functionality with anonymous user (which cannot read any content on author) you will get an empty result.
Why are we trying to get it out of authentication?
This URL in turn uses Content and reference information, which would also need session.
I want to get all the resources associated with a content when it is published.
Please refer to this thread on https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-find-the-list-of-al...
I need all the reference, not just assets.
com.day.cq.wcm.core.reference.ActivationReferenceSearchService
You can use getReferences() of this Service to get all References
Can't find this method in this jar package.
You are right this bundle is not available publicly, although the API is available in AEM.
One suggestion:
As per my understanding, just the Asset reference for replication should suffice for majority of the use-cases.
The other cases, where one might need template/policies, these are generally not meant to be replicated with pages every time. So any template-editor should publish them after editing. These should be process-oriented.
If we allow read access to content along with the Reference URL and the servlet, it would open too much info for an anonymous user
I understood, but I do need all the reference reference,including policy, template and so on. Are there any other methods?
Or is there any way to get all the reference of a content?
@Johann_Lu can you please elaborate a bit on this. What exactly are you trying to do
I want to get all the resources associated with a content when it is published
Is there any way to get all the reference of a content?
authentication != authorization.
When you are not authenticated, then the system will consider you as the anonymous user; and if you invoke this functionality with anonymous user (which cannot read any content on author) you will get an empty result.
Hi @Johann_Lu ,
Check Configuration: Ensure that you have configured the authentication requirements correctly. Double-check the path - prefix in -/libs/wcm/core/content/reference and ensure that it matches the path you want to allow anonymous access to.
Permissions: Make sure that the permissions are set correctly for the path you're trying to access. Even if authentication requirements are configured, if the permissions are not set to allow anonymous access, users will still be prompted to log in.
Cache: Sometimes, changes to authentication requirements may not take effect immediately due to caching. Try clearing any caches in your Apache Sling instance and restarting it to see if the changes are reflected.
Debugging: Enable debugging/logging for the authentication service to see if there are any errors or unexpected behavior occurring. This can help pinpoint the issue more accurately.
Documentation: Refer to the official Apache Sling documentation for authentication and authorization to ensure you're following best practices and using the correct configuration options.
Community Support: If you're still unable to resolve the issue, consider reaching out to the Apache Sling community for assistance. They may be able to provide additional insights or help troubleshoot the problem further.
By following these steps and possibly seeking assistance from the community, you should be able to identify and resolve the issue with Apache Sling's authentication service.
@Johann_Lu Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies