]> granicus.if.org Git - mutt/commitdiff
Change IMAP to try oauthbearer first.
authorKevin McCarthy <kevin@8t8.us>
Fri, 29 Mar 2019 22:21:02 +0000 (15:21 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 29 Mar 2019 22:21:02 +0000 (15:21 -0700)
$imap_authenticators says if it is unset, the authenticators from
most-secure to secure will be tried.  It makes sense for oauthbearer
to come first, like with POP.

To make this change backwards compatible, it depends on the previous
commit, which changed imap_auth_oauth() to return IMAP_AUTH_UNAVAIL if
oauth is not configured or explictily requested.

imap/auth.c

index 1b26077ab718cbca2c97153ea6538d6156133b5e..d4755ae7ab7cc959185ccfc72adc191385be81e7 100644 (file)
@@ -29,6 +29,7 @@
 #include "auth.h"
 
 static const imap_auth_t imap_authenticators[] = {
+  { imap_auth_oauth, "oauthbearer" },
 #ifdef USE_SASL
   { imap_auth_sasl, NULL },
 #else
@@ -42,7 +43,6 @@ static const imap_auth_t imap_authenticators[] = {
   { imap_auth_cram_md5, "cram-md5" },
 #endif
   { imap_auth_login, "login" },
-  { imap_auth_oauth, "oauthbearer" },
 
   { NULL, NULL }
 };