[AEM Author instance] Exclude servlet from authentication requirement | Community
Skip to main content
vkeerthy
Level 3
Oct 16, 2015 2:27 AM UTC
Solved

[AEM Author instance] Exclude servlet from authentication requirement

Hi 

I have written a custom servlet in AEM author (v6.1). I would like to get response from  this servlet without providing auth credentials. Is it possible to have such exclusion in AEM author instance?

Current behaviour: At this moment, when I hit my servlet, the request is redirected to AEM login page. 

 

Any pointers on this will be a big help. Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

Configure to exclude authentication at http://localhost:port/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator

Or

in your code add

Property(name = "sling.auth.requirements", value = "-{pathtoservlet}")

 Notice the dash prefixing the path - if you don't include the dash that means the path requires authentication.

3 replies

QueryResolved
Level 2
Jun 3, 2020 10:13 AM UTC

In case  of author AEM 6.5 instance, it can be done by excluding the servlet path in “Apache Sling Authentication Service"https://queryresolved.com/2020/06/03/aem-6-5-author-exclude-a-url-from-authentication-requirement/

Translate
Level 4
Dec 14, 2017 12:52 PM UTC

I am facing a similar issue, I want to allow the user to access AEM-INSTANCE/linkshare.html so I configured the following:

I still get the login screen if I navigate to the linkshare url, what am I doing wrong?

Translate
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

Configure to exclude authentication at http://localhost:port/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator

Or

in your code add

Property(name = "sling.auth.requirements", value = "-{pathtoservlet}")

 Notice the dash prefixing the path - if you don't include the dash that means the path requires authentication.

Translate