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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Browser authentication dialog when HTTPService fails with a 401 response code


Level 1
I am using a HTTP Service to talk to a third party API and
passing username/password in HTTP Basic Auth header.

When i enter wrong credentials through my application, as
expected i get a 401 unauthorized response. But before the fault
handler gets called, my browser shows the authentication dialog
asking me to re-enter the username/password.

It happens on safari and firefox browser on OS X. I have not
checked other environments.

Is this expected? I do not want the browser to show me an
authentication dialog and want my application

to handle the 401 error.


0 Replies