]> granicus.if.org Git - neomutt/commitdiff
Add some brief documentation on OAUTH support
authorKevin McCarthy <kevin@8t8.us>
Wed, 7 Nov 2018 21:38:53 +0000 (13:38 -0800)
committerRichard Russon <rich@flatcap.org>
Mon, 26 Nov 2018 18:27:21 +0000 (18:27 +0000)
These are just pulled from Brandon's commit message.

doc/manual.xml.head
init.h

index 088fe1a79bdc3cba00ec73f4fb5665952bf6659a..7b077c2261dc48ff99e91066f73b0983649db113 100644 (file)
@@ -10822,6 +10822,39 @@ set timeout=15
       </para>
     </sect1>
 
+    <sect1 id="oauth">
+      <title>OAUTHBEARER Support</title>
+      <para>
+        Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.
+      </para>
+      <para>
+        At least for Gmail, you can use the <literal>oauth2.py</literal>script
+        from Google's gmail-oauth2-tools:
+        <ulink url="https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py">https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py</ulink>
+      </para>
+      <para>
+        You'll need to get your own oauth client credentials for Gmail here: 
+        <ulink url="https://console.developers.google.com/apis/credentials">https://console.developers.google.com/apis/credentials</ulink>
+      </para>
+      <para>
+        Then, you'd use <literal>oauth2.py</literal> with
+        <literal>--generate_oauth2_token</literal> to get a refresh token, and
+        configure mutt with:
+      </para>
+
+<screen>
+set imap_authenticators="oauthbearer"
+set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\
+    --client_id=[client_id] --client_secret=[client_secret]\
+    --refresh_token=[refresh_token]"
+</screen>
+
+      <para>
+        Substitute pop or smtp for imap in the above example to configure for
+        those.
+      </para>
+    </sect1>
+
     <sect1 id="account-hook">
       <title>Managing Multiple Accounts</title>
       <para>
diff --git a/init.h b/init.h
index a8e5f3c1456c761445aa4803ce39f8708c9d42eb..380d043396ffe6bfaecbd381e62b28749d628d23 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1495,7 +1495,7 @@ struct ConfigDef MuttVars[] = {
   ** The command to run to generate an OAUTH refresh token for
   ** authorizing your connection to your IMAP server.  This command will be
   ** run on every connection attempt that uses the OAUTHBEARER authentication
-  ** mechanism.
+  ** mechanism.  See ``$oauth'' for details.
   */
   { "imap_pass",        DT_STRING,  R_NONE|F_SENSITIVE, &ImapPass, 0 },
   /*
@@ -2817,7 +2817,7 @@ struct ConfigDef MuttVars[] = {
   ** The command to run to generate an OAUTH refresh token for
   ** authorizing your connection to your POP server.  This command will be
   ** run on every connection attempt that uses the OAUTHBEARER authentication
-  ** mechanism.
+  ** mechanism.  See ``$oauth'' for details.
   */
   { "pop_pass",         DT_STRING,  R_NONE|F_SENSITIVE, &PopPass, 0 },
   /*
@@ -3872,7 +3872,7 @@ struct ConfigDef MuttVars[] = {
   ** The command to run to generate an OAUTH refresh token for
   ** authorizing your connection to your SMTP server.  This command will be
   ** run on every connection attempt that uses the OAUTHBEARER authentication
-  ** mechanism.
+  ** mechanism.  See ``$oauth'' for details.
   */
   { "smtp_pass",        DT_STRING,  R_NONE|F_SENSITIVE, &SmtpPass, 0 },
   /*