Following the feedback on #1084, I'd like to rework it into two PRs:
- A generic authentication hook in the existing plugin system: one new symbol,
pgdog_authenticate, next topgdog_route. It reuses the loader, the rustc/version gate, the[[plugins]]config and the macro crate as they are today. - The JWT feature reimplemented as the first plugin using that hook, with all its configuration moved out of
[general]and into the plugin's own config file.
Plus one small core feature that isn't JWT-specific: a per-user server_role option so pgdog can impersonate a role on the backend (details below).