cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to obtain a 'unique authentication context' in libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 1 Aug 2012 22:57:09 +0200 (CEST)

On Mon, 30 Jul 2012, Ellié Computing Open Source Program wrote:

> So, I was thinking of an option such as
> “CULROPT_AUTHENTICATION_CONTEXT_GENERATION” (of course naming here is just a
> vague idea), it would be 0 by default. It would be tested by the connection
> reuse algorithm (can reuse only if values in ‘about-to-be-connected’ and
> reusable connection are equal). The user code of libcurl would increment the
> value each time it knows the user did special things about authentication
> information that libcurl cannot be aware of.
>
> Is there another way to do that? or should I propose a patch?

Will that be enough for this use case? I mean, will an application really
always know when the context is changed when it uses an authentication agent?

I think I'd be more inclined to instead favor Joe Mason's idea and offer a
callback that would let an application to return MATCH or NO MATCH so that
whatever context we can think of can be taken into account - exactly at the
moment where the matching is checked and not having to be set or deemed before
the check is necessary. But I'll confess I haven't really thought about how
such a callback prototype would look like...

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-01