Johan Hoogenboezem | 17 May 12:14

basic authentication (the right way)

Hi,

We’re using basic authentication for our GI app. Before we started using DWR, we passed login credentials via the open() method on GI’s jsx3.net.Request object. With DWR, I expected something similar to be required. However, we ended up hacking engine.js like this:

 

      if (DWREngine.USER_NAME != undefined) {

        batch.req.open(batch.httpMethod, request.url, batch.async, DWREngine.USER_NAME,

          DWREngine.USER_PASSWORD);

      }

      else

        batch.req.open(batch.httpMethod, request.url, batch.async);

 

We would set DWREngine.USER_NAME and DWREngine.USER_PASSWORD after logging in successfully. This works, but I’ve never felt comfortable with it. It’s messy etc. etc. etc.

What is the recommended way for doing this? Something like options to be set for the engine?

 

 

Regards

Johan Hoogenboezem

No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.16/1445 - Release Date: 2008/05/15 07:25 PM

Gmane