Forum OpenACS Development: "Integrating" OpenACS with .htaccess

Collapse
Posted by Dirk Gomez on
I want to integrate an OpenACS system with data residing on an external server that requires authentication via HTTP Basic Authentication against a .htaccess file.

Is there a proc in OpenACS that already allows that - or has someone somesuch code that allows me to authenticate automatically from within OpenACS once it is possible that a user may hit on the external protected site?

Collapse
Posted by Michael Hanisch on

Hi Dirk,
could you explain what exactly you're trying to achieve? Do you want to replace the authentication code in OpenACS w/ code that authenticates using the external server instead? Or do you just want to access a URL an the other server which happens to be password protected?

(In the latter case, you could probably use something like the gatekeeper package and rewrite the external URLs (or HTTP requests) to include user/password information.)

Collapse
Posted by Dirk Gomez on
I just want to access the external URL - I don't want the user to authenticate twice basically.
Then just passing the user/password should be enough - if the usernames/passwords on both systems are identical, of course. So you could simply rewrite the URLs you GET to the form http://username:password@host/some/path ; or just add an "Authorization:" header to the HTTP requests (see e.g. RFC2616) and make the request using the gateway package.

Disclaimer: I haven't used the gateway package yet, but based on its feature list it seems a to be a good starting point for what you want to do.

Cheers,
Michael

P.S. Grüße nach Berlin! 😊