[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 4685 - in trunk/subversion: include libsvn_wc libsvn_client libsvn_auth

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-01-31 23:35:24 CET

On Fri, Jan 31, 2003 at 04:11:20PM -0600, Ben Collins-Sussman wrote:
>...
> * To enforce this policy, delete our svn_auth_register_provider()
> interface. Instead, when the application calls svn_auth_open(),
> it will pass it a static array of providers, ordered exactly the
> way it wants. This prevents any future layers from registering
> providers later on: the ordered providers are attached to the
> auth_baton at birth.

More than likely, apps will do something like this:

svn_auth.h:
  typedef struct {
    svn_auth_provider_t *provider;
    void *baton;
  };

application:
  svn_auth_provider_pair_t providers[4];
  
  get_cmdline_option_provider(&providers[0]);
  get_auth_cache_provider(&providers[1]);
  get_prompt_provider(&providers[2]);
  providers[3].provider = NULL; /* sentinel */

  SVN_ERR( svn_auth_open(&auth_baton, providers, pool) );

>...
> Example 2: when the RA layer receives a certs challenge, it will
> get "machinename" and "realm" information that will need to hand
> off to an already registered certs-provider.

Strictly speaking, I'm not sure if "realm" is a cert concept. It definitely
is for Basic authentication, though. Regardless, both of those schemes need
the hostname that you're connecting to.

>...
> * provider implementations will look for specific runtime params
> in the hash that they need; if not present, they simply
> fail to return credentials (return NULL). (and obviously,
> each provider will document what runtime params it needs.)

And the providers doc these in their header.

And they name them reasonably, to prevent people stomping on them. I don't
think there will be many, so there shouldn't really be a problem.

> I think this proposal has all of the desired features:
>...
> What say ye?

+1

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 31 23:32:40 2003

This is an archived mail posted to the Subversion Dev mailing list.