summaryrefslogtreecommitdiffstats
path: root/account.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-06-11 16:11:36 -0700
committerKevin McCarthy <kevin@8t8.us>2020-06-13 14:44:17 -0700
commitc7a872d1eeea39df148396869c1cbbc0fa26552f (patch)
tree0fa80c6f4e6e0a7f8693ee087f18b3870a16b718 /account.h
parent5b844328bb7d7fb0357328bed002e7672f9b9e2a (diff)
Add basic XOAUTH2 support.
This still relies on an external script to obtain the resource access token. Since XOAUTH2 should be slowly going away, use the same refresh_commands as with OAUTHBEARER. Unlike OAUTHBEARER, XOAUTH2 must be explicitly added to the $imap/smtp/pop_authenticators list. To keep the shared functions simpler, convert them to use buffers. RFC 7628 indicates that upon authentication failure the clients should be sending an BASE 64 encoded '^a' ("AQ=="), to terminate the SASL session, so change all the handlers to do that and read the following response. The RFC doesn't comment about a line terminator being required, but I assume it is, so add that too.
Diffstat (limited to 'account.h')
-rw-r--r--account.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/account.h b/account.h
index 943da839..2eccb7f4 100644
--- a/account.h
+++ b/account.h
@@ -57,6 +57,6 @@ int mutt_account_getuser (ACCOUNT* account);
int mutt_account_getlogin (ACCOUNT* account);
int mutt_account_getpass (ACCOUNT* account);
void mutt_account_unsetpass (ACCOUNT* account);
-char* mutt_account_getoauthbearer (ACCOUNT* account);
+int mutt_account_getoauthbearer (ACCOUNT* account, BUFFER *authbearer, int xoauth2);
#endif /* _MUTT_ACCOUNT_H_ */