Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppressing browser's authentication dialog

I apologize that there is a similar question already but I'd like to ask it more broadly.

Is there any way at all to determine on the client side of a web application if requesting a resource will return a 401 status code and cause the browser to display an ugly authentication dialog?

Or, is there any way at all to load an mp3 audio resource in flash which fails invisibly in the case of a 401 status code rather than letting the browser show an ugly dialog?

The Adobe Air run-time will suppress the authentication if I set the "authenticate" property of the URLRequest object but this property is not in the Flash run-time. Any solution which works on the client will do. An XMLHttpRequest is not likely to work as the resources in questions will be at different domains.

It is important to fail invisibly because the application will have a list of many audio resources to try and it makes no sense to bother the user to try and authenticate for one when there are many others available. It is important that the solution work on the client because the mp3's in question come from various servers outside my control.

like image 667
Joe Langeway Avatar asked Jul 19 '09 01:07

Joe Langeway


1 Answers

I'm having the same problem with the twitter api - any protected user requires the client to authenticate.

The only solution that I could come up with was to load the pages serverside and return a list of the urls with their http response code.

like image 181
zaius Avatar answered Oct 19 '22 06:10

zaius