basic authentication (the right way)
Subject: basic authentication (the right way)
Newsgroups: gmane.comp.java.dwr.user
Date: 2008-05-17 10:14:45 GMT
Expires: This article expires on 2008-05-31
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
RSS Feed