Add token_command support for Gmail targets
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20261104-token-command-2e22bf5ba436Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Decouple GmailTarget from OAuth file credential managementsrc/ src/ src/ +2 more | +610 | 0 replies | |
| 2/2 | Add token_command support for Gmail targetsdocs/ korgalore-example.toml man/ +6 more | +404 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH kgl 0/2] Add token_command support for Gmail targets
This series adds support for obtaining Gmail OAuth2 bearer tokens from an external command via a new token_command setting on Gmail targets (similar to passwordeval in msmtp or PassCmd in mbsync). This lets korgalore share an encrypted credential store or OAuth2 token helper (such as oama, git-credential helpers, or custom keyring/GPG scripts) with other mail tools without managing separate Google OAuth client secrets, running another browser login flow, or keeping an unencrypted token JSON file on disk.
Patch 1 extracts file-based OAuth credential management out of GmailTarget into a dedicated google_creds module so GmailTarget accepts any google.auth Credentials provider. Patch 2 adds the command-backed credential provider, wires up token_command, verifies Gmail access during kgl auth, and documents the new option.
---
Dmitry Torokhov (2):
Decouple GmailTarget from OAuth file credential management Add token_command support for Gmail targets
docs/configuration.rst | 10 +- korgalore-example.toml | 2 + man/korgalore.toml.5 | 12 +- src/korgalore/cli.py | 35 +++-- src/korgalore/gmail_target.py | 225 ++++++++++++++-------------- src/korgalore/google_creds.py | 336 ++++++++++++++++++++++++++++++++++++++++++ tests/test_cli_misc.py | 103 ++++++++++++- tests/test_gmail_target.py | 254 +++++++++++++++++-------------- tests/test_google_creds.py | 262 ++++++++++++++++++++++++++++++++ 9 files changed, 997 insertions(+), 242 deletions(-)
---
base-commit: ea22e7c8701e566328f197c748718cd689f9ea28
change-id: 20261104-token-command-2e22bf5ba436
Thanks.
Signature · 1 line
Dmitry