disable HTTP digest Authentication Window in AIR

I'm trying to da a digest authentication with AIR and it works except for the annoying authentication window (default system window) that comes up asking for username and password.

If I click cancel everything works as it should till the next request of the authentication and so on. But it works only with clicking cancel all the time.

If I click OK the window pops up again (kind of logic, isn't it).

the request looks like this:

public function startT0Registration():void
{
    var req : URLRequest = new URLRequest(url);
    var loader : URLLoader = new URLLoader();
    req.method = URLRequestMethod.PUT;

    loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, handleRegistration);
    try {
        loader.load(req);
    } catch (error:Error) {
        trace("startRegistration: Unable to load requested document.");
    }
}

The problem I have is when I try to disable the window with:

req.authenticate = false;

I'm not getting the needed HTTP 401 Error from the server with the following WWW-Athenticate header information:

Digest realm="TestRealm", qop="auth", nonce="32L HEX HASH", opaque="32L HEX HASH"

Instead of getting the 401 Error, I'm getting a HTTP 407 Error without the neccessary WWW-Athenticate header information.

As I have to do a digest authentication I need that header to respond to the server.

There must be a solution for that.


seems to be a problem with a proxy server between my application and the backend. --> Problem solved thru a proxy free connection and req.authenticate = false;

链接地址: http://www.djcxy.com/p/3794.html

上一篇: iOS:使用XMLHttpRequest进行身份验证

下一篇: 在AIR中禁用HTTP摘要身份验证窗口