Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

[AEM Author instance] Exclude servlet from authentication requirement

Avatar

Avatar
Validate 1
Level 2
vkeerthy
Level 2

Like

1 like

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
vkeerthy
Level 2

Like

1 like

Total Posts

32 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
vkeerthy
Level 2

15-10-2015

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
Level 10
Sham_HC
Level 10

Likes

160 likes

Total Posts

2,114 posts

Correct Reply

1,204 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile

Avatar
Boost 50
Level 10
Sham_HC
Level 10

Likes

160 likes

Total Posts

2,114 posts

Correct Reply

1,204 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile
Sham_HC
Level 10

15-10-2015

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.

Answers (2)

Answers (2)

Avatar

Avatar
Boost 5
Level 2
QueryResolved
Level 2

Likes

5 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile

Avatar
Boost 5
Level 2
QueryResolved
Level 2

Likes

5 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile
QueryResolved
Level 2

03-06-2020

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/

Avatar

Avatar
Validate 10
Level 4
Jdruwe
Level 4

Likes

29 likes

Total Posts

113 posts

Correct Reply

7 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
Jdruwe
Level 4

Likes

29 likes

Total Posts

113 posts

Correct Reply

7 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
Jdruwe
Level 4

14-12-2017

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

Screen Shot 2017-12-14 at 13.47.59.png

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