python-caldav / caldav

Apache License 2.0
317 stars 94 forks source link

Support for unauthenticated requests to the server #238

Closed more-pepsi closed 1 year ago

more-pepsi commented 1 year ago

Is there any plan for support of making unauthenticated requests to a server. For example if I was going to send someone a invite. How could I even query for their calendars, or search for a available time frame?

All the examples seem to make the requests to a caldev server the client owns the authentication token for. How about other servers?

tobixen commented 1 year ago

I'm not really sure what to answer to this one ... I came up with many different answers, all of them sort of true, but some of the answers possibly less useful than others:

  1. I think the most honest answer is that I haven't thought much on this. I think almost all the documentation, examples and test code starts by doing a client.principal() call and then fetches calendars from there - and that obviously won't work if no user is given (except if it's a single-user calendar server). I've briefly touched this problem in #180

  2. Another probably quite true but quite untested answer is that the library already supports unauthenticated requests. If no username nor password is given, and the server does not require it, then ... things will just work. However, due to what I wrote above one needs to know the internals of the library to be able to use it.

  3. As far as I know most servers either require authentication on (almost?) every caldav request, or expects authentication to be taken care of by some frontend (i.e. apache or nginx). I may be mistaken on that, I'm happy to be pointed in the right direction. If I get some good use cases and access to some server I can test towards (see #45) that accepts "public" access to some parts via the caldav protocol (a public ICS feed does not count, as it's not part of the caldav standard), then I can try to look into things and maybe make some tests and example code.

  4. As for the scheduling extension to the caldav standard, this is not quite supported yet. I started making some code towards it, but failed to find testing servers to test it towards (at some point I was handled some test accounts to play with, but after that I've had other priorities ... but I'll get to it at one point).