diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-01-15 12:42:06 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-01-15 12:42:06 -0700 |
commit | 9822842646bc2b940d4b98a260ee4e3ac26fce57 (patch) | |
tree | 9d468eb7a6d6b3a41c6c8cd7d542009cb498bc5b /alpine/alpine.c | |
parent | 36fcd566e99d76543c28ce985fc71e8a7cfb6c83 (diff) | |
download | alpine-9822842646bc2b940d4b98a260ee4e3ac26fce57.tar.xz |
* Add configuration screen for XOAUTH, so users can configure their own
client-id and client-secret information.
Diffstat (limited to 'alpine/alpine.c')
-rw-r--r-- | alpine/alpine.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/alpine/alpine.c b/alpine/alpine.c index a4e8f3f3..cd9899a5 100644 --- a/alpine/alpine.c +++ b/alpine/alpine.c @@ -41,6 +41,7 @@ static char rcsid[] = "$Id: alpine.c 1266 2009-07-14 18:39:12Z hubert@u.washingt #include "context.h" #include "mailview.h" #include "imap.h" +#include "xoauth2conf.h" #include "radio.h" #include "folder.h" #include "send.h" @@ -63,6 +64,7 @@ static char rcsid[] = "$Id: alpine.c 1266 2009-07-14 18:39:12Z hubert@u.washingt #include "after.h" #include "smime.h" #include "newmail.h" +#include "xoauth2conf.h" #ifndef _WINDOWS #include "../pico/osdep/raw.h" /* for STD*_FD */ #endif @@ -341,6 +343,7 @@ main(int argc, char **argv) mail_parameters(NULL, SET_FREEELTSPAREP, (void *) free_pine_elt); mail_parameters(NULL, SET_FREEBODYSPAREP, (void *) free_body_sparep); mail_parameters(NULL, SET_OA2CLIENTGETACCESSCODE, (void *) oauth2_get_access_code); + mail_parameters(NULL, SET_OA2CLIENTINFO, (void *) oauth2_get_client_info); init_pinerc(pine_state, &init_pinerc_debugging); @@ -2362,6 +2365,10 @@ choose_setup_cmd(int cmd, MSGNO_S *msgmap, SCROLL_S *sparms) srv->cmd = 'c'; break; + case MC_XOAUTH2 : + srv->cmd = 'u'; + break; + case MC_SIG : srv->cmd = 's'; break; @@ -2569,6 +2576,11 @@ setup_menu(struct pine *ps) } so_puts(store, "\n"); + so_puts(store, _("(U) xoaUth2:\n")); + so_puts(store, _(" Set client-id and client-secret to use the XOAUTH2\n")); + so_puts(store, _(" authenticator.\n")); + + so_puts(store, "\n"); so_puts(store, _("(Z) RemoteConfigSetup:\n")); so_puts(store, _(" This is a command you will probably only want to use once, if at all.\n")); so_puts(store, _(" It helps you transfer your Alpine configuration data to an IMAP server,\n")); @@ -2802,6 +2814,12 @@ do_setup_task(int command) ps_global->mangled_screen = 1; break; + /*----- XOAUTH2 CLIENT CONFIGURATION -----*/ + case 'u': + alpine_xoauth2_configuration(ps_global, edit_exceptions); + ps_global->mangled_screen = 1; + break; + /*----- COLLECTION LIST -----*/ case 'l': folder_config_screen(ps_global, edit_exceptions); |