Just for clarification: the ticket title says plural "providers", currently there is one. Is the goal to make that one configurable, to add others, or to make the configuration part of the generic interface?
Should have been more specific. The idea behind this ticket is to address this TODO:
https://git.sr.ht/~sircmpwn/tokidoki/tree/master/item/cmd/tokidoki/main.go#L32
By accepting a flag (
-auth
perhaps) which includes a connection string for the auth provider, e.g.imap://...
orpostgres://...
. Then the scope of this ticket is parsing that URL, selecting IMAP from the list if imap:// or imaps:// is used, then rigging up the appropriate middleware.
I pushed this to master, but it doesn't seem to pick up the "Implements:"? I figured this is mostly uncontroversial, but feel free to suggest style fixes or any specifics you had in mind, so I can get a better sense for your expectations/approaches/style/etc.:
https://git.sr.ht/~sircmpwn/tokidoki/commit/071ee7c729a3bb7d95c4e181a329ce1bd3dca319
LGTM. I would solve that TODO sooner rather than later, though.
Conrad Hoffmann referenced this ticket in commit 071ee7c.
Just a bit of info on our preferred auth - we would like to use local CDB (constant db) lookups instead of sql or imap (as per my mail ~sircmpwn) For example using:
https://github.com/colinmarc/cdb
This is our preferred way for auth lookups at migadu and here it is preferred as it allows separation of DAV accounts from imap. We can expand on that later.