aerc-accounts: improve logic for parsing XOAUTH2 URL params (#6530)
This commit fixes an issue in aerc-accounts that prevents oauth2 accounts from being generated from given parameters. It also allows users to add XOAUTH2 credentials without having to add all four of client_id, client_secret, token_endpoint, and scope. It further adds tests for the XOAUTH2 config generation.
This commit is contained in:
parent
74f0a8546e
commit
18e74c2e02
4 changed files with 52 additions and 2 deletions
9
tests/modules/programs/aerc/oauth.expected
Normal file
9
tests/modules/programs/aerc/oauth.expected
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Generated by Home Manager.
|
||||
|
||||
[basic]
|
||||
copy-to = Sent
|
||||
default = Inbox
|
||||
from = Annie X. Hacker <anniex@mail.invalid>
|
||||
outgoing = smtp+xoauth2://anniex@smtp.office365.com:587?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Ftoken
|
||||
postpone = Drafts
|
||||
source = imaps+xoauth2://anniex@outlook.office365.com:993?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Ftoken
|
||||
Loading…
Add table
Add a link
Reference in a new issue