diff options
author | Eduardo Chappa <chappa@washington.edu> | 2024-01-21 21:38:25 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2024-01-21 21:38:25 -0700 |
commit | f7deb74aa5612d4d49da4ec179e61124e8fa0763 (patch) | |
tree | 8af49c5104a5c7b223b9c7d6f155e90ae056536b /imap | |
parent | 9e223693bd1bb9d6ede1d05f62cc1cf009c23c62 (diff) | |
download | alpine-f7deb74aa5612d4d49da4ec179e61124e8fa0763.tar.xz |
* Add the username information to the initial xoauth2 screen
that tells users that Alpine needs authorization to open
their account.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/src/c-client/mail.h | 4 | ||||
-rw-r--r-- | imap/src/c-client/oauth2_aux.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h index a294afd2..0449f130 100644 --- a/imap/src/c-client/mail.h +++ b/imap/src/c-client/mail.h @@ -2031,9 +2031,9 @@ typedef struct xoauth_default_s { } XOAUTH2_INFO_S; /* Supporting external functions for XOAUTH2 and OAUTHBEARER */ -typedef char *(*oauth2getaccesscode_t) (unsigned char *, char *, OAUTH2_S *, int *); +typedef char *(*oauth2getaccesscode_t) (unsigned char *, char *, OAUTH2_S *, NETMBX *, int *); typedef XOAUTH2_INFO_S *(*oauth2clientinfo_t)(unsigned char *name, char *user); -typedef void (*oauth2deviceinfo_t)(OAUTH2_S *, char *method); +typedef void (*oauth2deviceinfo_t)(OAUTH2_S *, char *, NETMBX *); void mm_login_oauth2_c_client_method (NETMBX *, char *, char *, OAUTH2_S *, unsigned long, int *); void oauth2deviceinfo_get_accesscode(void *, void *); XOAUTH2_INFO_S *new_xoauth2_info(void); diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c index 60e3b88d..26730de7 100644 --- a/imap/src/c-client/oauth2_aux.c +++ b/imap/src/c-client/oauth2_aux.c @@ -303,7 +303,7 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, if(oauth2->devicecode.verification_uri && oauth2->devicecode.user_code){ ogdi = (oauth2deviceinfo_t) mail_parameters (NIL, GET_OA2DEVICEINFO, NIL); - if(ogdi) (*ogdi)(oauth2, method); + if(ogdi) (*ogdi)(oauth2, method, mb); } mm_log("Got Json reply. Completed parsing.", (long) NIL); } @@ -378,7 +378,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, method, oauth2, tryanother); + oauth2->param[OA2_Code].value = (*ogac)(url, method, oauth2, mb, tryanother); if(server) fs_give((void **) &server); if(url) fs_give((void **) &url); |