session -> basic authentication? #307

Closed
mrjcleaver opened this Issue Sep 11, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@mrjcleaver

I need to provide a proxy for a source web server that protects its resources behind session-based authentication. (see below)

The proxy simply needs to instead protect those resources behind basic authentication.

Can node-http-proxy help me with this?

Thanks,
Martin.

e.g.. Session Based Login
request.post ( {
uri: "https://server.example.com/login"
, qs: {
username: "user@myserver.com"
, password: "mypasswd"
}
}
, function(error, response, body) {
console.log(request);

    request.get ({
        uri: "https://servername/licenseReport"
    }, function(error, response, body)   {
        if (error) {
            console.log("ERROR", error);
        } else {
            console.log("fetched");
        }
        answer = body;
@indexzero

This comment has been minimized.

Show comment Hide comment
@indexzero

indexzero Nov 29, 2012

Member

Yes. Check the session in the proxy request handler than based on that (potentially async) response make the proxy request; otherwise 401 (or 403)

Member

indexzero commented Nov 29, 2012

Yes. Check the session in the proxy request handler than based on that (potentially async) response make the proxy request; otherwise 401 (or 403)

@indexzero indexzero closed this Nov 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment