diff options
-rw-r--r-- | alpine/imap.c | 21 | ||||
-rw-r--r-- | doc/tech-notes/tech-notes.txt | 102 | ||||
-rw-r--r-- | imap/src/c-client/auth_bea.c | 7 | ||||
-rw-r--r-- | imap/src/c-client/auth_oa2.c | 9 | ||||
-rw-r--r-- | pith/pine.hlp | 2 |
5 files changed, 32 insertions, 109 deletions
diff --git a/alpine/imap.c b/alpine/imap.c index 6c14bc4d..638121e1 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -217,14 +217,29 @@ oauth2_get_access_code(char *url, char *method, OAUTH2_S *oauth2, int *tryanothe goto try_wantto; so_puts(in_store, "<HTML><P>"); - sprintf(tmp, _("<CENTER>Auhtorizing Alpine Access to %s Email Services</CENTER>"), oauth2->name); + sprintf(tmp, _("<CENTER>Authorizing Alpine Access to %s Email Services</CENTER>"), oauth2->name); so_puts(in_store, tmp); sprintf(tmp, _("</P><P>Alpine is attempting to log you into your %s account, using the %s method."), oauth2->name, method), so_puts(in_store, tmp); - so_puts(in_store, _(" In order to do that, Alpine needs to open the following URL:")); + if(strucmp(oauth2->name, "Gmail") == 0){ + so_puts(in_store, _(" If this is your first time setting up this type of authentication and you have a G-Suite account, please follow the steps below. ")); + so_puts(in_store, _("</P><P> First you must register Alpine with Google and create a client-id and client-secret. The steps below explain how to do this. If you already did that, then you can skip to the <A HREF=\"#secondpart\">second part</A> to continue with the setup process.")); + so_puts(in_store, _("<UL> ")); + so_puts(in_store, _("<LI>Firtst, login to <A HREF=\"https://console.developers.google.com\">https://console.developers.google.com</A>,")); + so_puts(in_store, _("and create a project. The name of the project is not important.")); + so_puts(in_store, _("<LI> Go to the Consent screen and make your app INTERNAL.")); + so_puts(in_store, _("<LI> Create OAUTH Credentials")); + so_puts(in_store, _("</UL> ")); + so_puts(in_store, _("<P> As a result of this process, you will get a client-id and a client-secret.")); + so_puts(in_store, _(" Exit this screen, and from Alpine's Main Screen press S U to save these values permanently.")); + so_puts(in_store, _(" Then retry login into Gmail's server, skip these steps, and continue with the steps below.")); + so_puts(in_store, _("</P><P> Cancelling this process will lead to an error in authentication that can be ignored.")); + } + + so_puts(in_store, _("</P><P><A NAME=\"secondpart\">In order</A> to authrorize Alpine to access your email, Alpine needs to open the following URL:")); so_puts(in_store,"</P><P>"); - sprintf(tmp_20k_buf, _("<A HREF=\"%s\">%s.</A>"), url, url); + sprintf(tmp_20k_buf, _("<A HREF=\"%s\">%s</A>"), url, url); so_puts(in_store, tmp_20k_buf); so_puts(in_store, _("</P><P> Alpine will try to use your URL Viewers setting to find a browser to open this URL.")); diff --git a/doc/tech-notes/tech-notes.txt b/doc/tech-notes/tech-notes.txt index 890c3910..d5a5d015 100644 --- a/doc/tech-notes/tech-notes.txt +++ b/doc/tech-notes/tech-notes.txt @@ -1,106 +1,4 @@ - Alpine Technical Notes - - Version 2.22, January 2020 - -Table of Contents - - Introduction - - * Design Goals - * Alpine Components - - Background Details - - * Domain Names - * RFC 2822 Compliance - * SMTP and Sendmail - * Internet Message Access Protocol (IMAP) - * Multipurpose Internet Mail Extensions (MIME) - * Folder Collections - - Building and Installation - - * Compile-time Options - * Including LDAP Functionality - * Including Kerberos 5 Functionality - * Other Alpine Compile-time Options - * IMAPd Compile-time Options - * Building the Alpine Programs - * Installing Alpine and Pico on UNIX Platforms - * Installing PC-Alpine - * Installing IMAPd - * Support Files and Environment Variables: UNIX Alpine - * Support Files, Environment Variables, and Registry Values: - PC-Alpine - - Command Line Arguments - - * Alpine - * Pico - * Pilot - - Configuration and Preferences - - * Alpine Configuration - * General Configuration Variables - * Configuration Features - * Hidden Config Variables and Features - * Retired Variables - * Tokens for Index and Replying - * Conditional Inclusion of Text for Reply-Leadin, Signatures, and - Templates - * Per Server Directory Configuration - * Color Configuration - * Index Line Color Configuration - * Role Configuration - * Filtering Configuration - * Scoring Configuration - * Other Rules Configuration - * Search Rules Configuration - * Patterns - * Configuring News - Configuration Notes - + Alpine in Function Key Mode - + Domain Settings - + Syntax for Collections - + Syntax for Folder Names - + Server Name Syntax - + Folder Namespaces - + What is a Mail Drop? - + Sorting a Folder - + Alternate Editor - + Signatures and Signature Placement - + Feature List Variable - + Configuration Inheritance - + Using Environment Variables - + SMTP Servers - + MIME.Types file - + Color Details - + S/MIME Overview - + Additional Notes on PC-Alpine - - Behind the Scenes - - * Address Books - * Remote Configuration - * Checkpointing - * Debug Files - * INBOX and Special Folders - * Internal Help Files - * International Character Sets - * Interrupted and Postponed Messages - * Message Status - * MIME: Reading a Message - * MIME: Sending a Message - * New Mail Notification - * NFS - * Printers and Printing - * Save and Export - * Sent Mail - * Spell Checker - * Terminal Emulation and Key Mapping - Introduction Design Goals diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c index b9bf61e1..2273b413 100644 --- a/imap/src/c-client/auth_bea.c +++ b/imap/src/c-client/auth_bea.c @@ -139,6 +139,11 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder /* empty challenge or user requested abort or client does not have info */ if(!oauth2.access_token) { + if (base){ + (*responder) (stream,base,"",strlen(base)); + if ((challenge = (*challenger) (stream,&clen)) != NULL) + fs_give ((void **) &challenge); + } (*responder) (stream,NIL,NIL,0); *trial = 0; /* cancel subsequent attempts */ ret = LONGT; /* will get a BAD response back */ @@ -297,7 +302,7 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, (oauth2getaccesscode_t) mail_parameters (NIL, GET_OA2CLIENTGETACCESSCODE, NIL); if(ogac) - oauth2->param[OA2_Code].value = (*ogac)(url, BEARERNAME, oauth2, tryanother); + oauth2->param[OA2_Code].value = (*ogac)(url, method, oauth2, tryanother); } if(oauth2->param[OA2_Code].value){ diff --git a/imap/src/c-client/auth_oa2.c b/imap/src/c-client/auth_oa2.c index 4c4a5898..76a529eb 100644 --- a/imap/src/c-client/auth_oa2.c +++ b/imap/src/c-client/auth_oa2.c @@ -170,6 +170,11 @@ long auth_oauth2_client (authchallenge_t challenger,authrespond_t responder, cha /* empty challenge or user requested abort or client does not have info */ if(!oauth2.access_token) { + if (base){ + (*responder) (stream,base,"",strlen(base)); + if ((challenge = (*challenger) (stream,&clen)) != NULL) + fs_give ((void **) &challenge); + } (*responder) (stream,NIL,NIL,0); *trial = 0; /* cancel subsequent attempts */ ret = LONGT; /* will get a BAD response back */ @@ -241,7 +246,7 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, oauth2clientinfo_t ogci = (oauth2clientinfo_t) mail_parameters (NIL, GET_OA2CLIENTINFO, NIL); - if(ogci) (*ogci)(oauth2->name, method, &oauth2->param[OA2_Id].value, + if(ogci) (*ogci)(oauth2->name, &oauth2->param[OA2_Id].value, &oauth2->param[OA2_Secret].value); } @@ -315,7 +320,7 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, (oauth2getaccesscode_t) mail_parameters (NIL, GET_OA2CLIENTGETACCESSCODE, NIL); if(ogac) - oauth2->param[OA2_Code].value = (*ogac)(url, oauth2, tryanother); + oauth2->param[OA2_Code].value = (*ogac)(url, method, oauth2, tryanother); } if(oauth2->param[OA2_Code].value){ diff --git a/pith/pine.hlp b/pith/pine.hlp index e2717455..21fe5dc3 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 419 2020-04-12 14:29:36 +Alpine Commit 422 2020-05-09 15:01:02 ============= h_news ================= <HTML> <HEAD> |