Apache sling authentication service not work | Community
Skip to main content
April 25, 2024
Solved

Apache sling authentication service not work

  • April 25, 2024
  • 5 replies
  • 2360 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

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.

 

5 replies

aanchal-sikka
Community Advisor
Community Advisor
April 25, 2024

@johann_lu 

 

Why are we trying to get it out of authentication? 

This URL in turn uses Content and reference information, which would also need session. 

Aanchal Sikka
Johann_LuAuthor
April 25, 2024

I want to get all the resources associated with a content when it is published.

aanchal-sikka
Community Advisor
Community Advisor
April 25, 2024
Jagadeesh_Prakash
Community Advisor
Community Advisor
April 25, 2024

@johann_lu  can you please elaborate a bit on this. What exactly are you trying to do 

Johann_LuAuthor
April 25, 2024

I want to get all the resources associated with a content when it is published

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
April 26, 2024

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.

 

HrishikeshKagne
Community Advisor
Community Advisor
May 5, 2024

Hi @johann_lu ,

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Hrishikesh Kagane
kautuk_sahni
Community Manager
Community Manager
May 16, 2024

@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.

Kautuk Sahni