[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Inf-IT DAVcl] accessing particular vcard files

On Jul 10, 2013, at 10:01 AM, chrysn <chrysn@xxxxxxxx> wrote:

> On Wed, Jul 10, 2013 at 01:21:48AM +0200, Ján Máté wrote:
>> Sorry but I don't fully understand the design of your "integration" - maybe a
>> demo URL can help to understand it.
> on your test system,
> http://www.inf-it.com/carddavmate/#http://www.inf-it.com:80/proxy/caldav.php/test%40inf-it.com/colleagues/7570c8d7656f6900f34a678cdf10dee7fb5a5f74ee9db5e043bd33eff7ddf16b.vcf
> should open the contact "Picard Jean-Luc" in the colleagues address
> book.

Okej, now I understand but this idea is VERY crazy, because the client can open a contact ONLY after performs full sync with the server. So in reality it can take lot of seconds - for example if you have 1000 contacts, then it loads all of them and only then opens the "selected" contact from the URL. Another problem is, that if you click to second "contact URL" then the browser will RELOAD the whole software, re-syncs all contacts and only then opens the second contact.

>> UID change in CardDavMATE (e.g.
>> http://username@server:port/principal_url/object.vcf) is very bad
>> idea, because I support multiple logins to the SAME principal URL with
>> different username - so the login name MUST be a part of UID.
> the reason why i stripped the 'test@xxxxxxxxxx@' from aftert the
> '#http://' in the above url is the basic assumption that an http
> resource (and, in particular, a webdav or carddav one) is basically
> independent of by which credentials it is accessed, and in general one
> can't predict which credentials the one who finally resolves the link
> will have available.
> the implementation could even accept links with user name, but should be
> prepared to search the available address books for one that matches if
> stripped off the user name and open that one. in pseudocode:
> requested_resource = window.location.hash
> requested_host = get_host_part(requested_resource)
> for current_principal in available_principals:
>    if requested_resource starts with remove_username(current_principal):
>        open requested_resource, replacing remove_username(current_principal) with current_principal
> i don't know where we should talk of host names and where of principals
> here, but do you see what i mean?

In CardDavMATE you can configure an array of accounts, for example:

	Principal URL: https://server.com:8443/caldav.php/cars/bmw/
	Username/Password: test/test
	Principal URL: https://server.com:8443/caldav.php/cars/bmw/	<-- identical principal URL
	Username/Password: test2/test2							<-- different user

then it loads all contacts from both accounts (each contact is loaded twice because the principal URL is the same). In the interface you will see only contacts from the selected addressbook (contacts from different addressbooks are "hidden") but in future I will add support for displaying all loaded contacts from all accounts/addressbooks. Then if you edit a contact and click to "Save", the PUT request requires the login name (because user A and user B privileges can be different). And this login name is extracted from the object UID - the client finds the proper account and use the proper password (in the Auth header) for the PUT request.

As you see the login name is REALLY required in the UID because it must be globally unique. Heuristic search on the UID value is VERY bad idea, because it requires sequential search and for performance reason I use hash - the key is the UID and the value is the destination object.


> best regards
> chrysn
> -- 
> To use raw power is to make yourself infinitely vulnerable to greater powers.
>  -- Bene Gesserit axiom

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Re: [Inf-IT DAVcl] accessing particular vcard fileschrysn <chrysn@xxxxxxxx>