couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Jackson <james.jack...@cern.ch>
Subject Re: Using multiple auth handlers
Date Tue, 07 Sep 2010 18:15:52 GMT
Just to wrap this up, I've worked out what to do - passing back the original request if I want
to passthrough a handler.

Cheers,
James.

On 7 Sep 2010, at 13:51, James Jackson wrote:

> Hi all,
> 
> I'm just writing some custom auth handlers for a CouchDB cluster we are setting up. To
do what we need to do, in the security context we require, I need to run two such custom handlers.
I believe that I should be able to do this with the following syntax:
> 
> [httpd]
> authentication_handlers = {couch_cms_auth, cms_backend_authentication_handler},{couch_cms_auth,
cms_host_authentication_hander}
> 
> Now, each of these handlers on their own work just fine, but I have problems when attempting
to use both. My understanding is that if one throws an unauthorized exception, then the next
handler in the list should be tried. However, I see a throw in the first handler kill the
request there and then with a 401, without trying the second handler.
> 
> Have I misunderstood this behaviour, or do I need to modify how I write my custom handlers
so they behave with each other?
> 
> Best regards,
> James Jackson.


Mime
View raw message