Browser authentication dialog when HTTPService fails with a 401 response code

Avatar

Avatar

cybersnl

Avatar

cybersnl

cybersnl

12-12-2008

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.



thanks,

Sunil

Replies

Avatar

Avatar

Zee_Yang

Avatar

Zee_Yang

Zee_Yang

13-12-2008

this is really a browser issue outside the scope of data
services. my best guess is to use javascript in the html wrapper to
silence the 401 responses.

Avatar

Avatar

terakus

Avatar

terakus

terakus

15-12-2008

Is there any way to catch the 401 header response from HTTP
service or repress air from showing it? Using JavaScript will solve
the problem but I prefer to keep it all in AS if possible.

Avatar

Avatar

Daniel_McQuille

Avatar

Daniel_McQuille

Daniel_McQuille

23-10-2010

Having same problem trying to do BASIC authentication via HTTPService. Any thoughts on how to suppress dialog after a 401 is returned from server on a HTTPService request?