mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add support for the oauth2.el library in nnimap and smtpmail
* doc/misc/gnus.texi (Customizing the IMAP Connection): * doc/misc/smtpmail.texi (Authentication): Mention it. * lisp/gnus/nnimap.el (nnimap-login): Support oauth2. * lisp/mail/smtpmail.el (smtpmail-try-auth-method): New function for oauth2.
This commit is contained in:
parent
50d3178a4f
commit
1505dca91f
5 changed files with 30 additions and 6 deletions
|
|
@ -636,6 +636,14 @@ USER and PASSWORD should be non-nil."
|
|||
(base64-encode-string (concat "\0" user "\0" password) t))
|
||||
235))
|
||||
|
||||
(cl-defmethod smtpmail-try-auth-method
|
||||
(process (_mech (eql xoauth2)) user password)
|
||||
(smtpmail-command-or-throw
|
||||
process
|
||||
(concat "AUTH XOAUTH2 "
|
||||
(base64-encode-string
|
||||
(concat "user=" user "\1auth=Bearer " password "\1\1") t))))
|
||||
|
||||
(defun smtpmail-response-code (string)
|
||||
(when string
|
||||
(with-temp-buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue