summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-07-09 11:58:47 -0600
committerEduardo Chappa <chappa@washington.edu>2020-07-09 11:58:47 -0600
commitbbfbb2b668fc4a590a505a5f852eac9ea8a59da2 (patch)
tree26da874cf389011f8ef5517643e225d724e0534d
parent6081f1b5740a1b56446eee44c8267a6bce870ac0 (diff)
downloadalpine-bbfbb2b668fc4a590a505a5f852eac9ea8a59da2.tar.xz
* Addition of Yandex.com to the list of services that Alpine can use XOAUTH2 to
authenticate for reading and sending email.
-rw-r--r--alpine/imap.c29
-rw-r--r--alpine/xoauth2.h5
-rw-r--r--alpine/xoauth2conf.c1
-rw-r--r--pith/pine.hlp5
4 files changed, 39 insertions, 1 deletions
diff --git a/alpine/imap.c b/alpine/imap.c
index fe4fdce..bf5f9ae 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -232,6 +232,35 @@ OAUTH2_S alpine_oauth2_list[] =
0, /* first time indicator */
1 /* client secret required */
},
+ {"Yandex",
+ {"imap.yandex.com", "smtp.yandex.com", NULL, NULL},
+ {{"client_id", NULL},
+ {"client_secret", NULL}, /* not used, but needed */
+ {"tenant", NULL}, /* not used */
+ {"code", NULL}, /* used during authorization */
+ {"refresh_token", NULL},
+ {"scope", NULL}, /* not needed, so not used */
+ {"redirect_uri", "https://oauth.yandex.ru/verification_code"},
+ {"grant_type", "authorization_code"},
+ {"grant_type", "refresh_token"},
+ {"response_type", "code"},
+ {"state", NULL}, /* not used */
+ {"device_code", NULL} /* not used */
+ },
+ {{"GET", "https://oauth.yandex.com/authorize", /* Get Access Code */
+ {OA2_Id, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End, OA2_End}},
+ {NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* device code, not used */
+ {"POST", "https://oauth.yandex.com/token", /* Get first Refresh Token and Access token */
+ {OA2_Id, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Secret, OA2_Code, OA2_End, OA2_End}},
+ {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */
+ {OA2_Id, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_Secret, OA2_End, OA2_End, OA2_End}}
+ },
+ {NULL, NULL, NULL, 0, 0, NULL}, /* device_code information, not used */
+ NULL, /* access token */
+ 0, /* expiration time */
+ 0, /* first time indicator */
+ 1 /* client secret required */
+ },
{ NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0},
};
diff --git a/alpine/xoauth2.h b/alpine/xoauth2.h
index 739a3b7..0a17a22 100644
--- a/alpine/xoauth2.h
+++ b/alpine/xoauth2.h
@@ -25,4 +25,9 @@
#define OUTLOOK_SECRET "Tk-DAcEi13-FeSsY_Ja4Y.-MyL66I.wIPt"
#define OUTLOOK_TENANT "common"
+#define YANDEX_NAME "Yandex"
+#define YANDEX_ID "393578fee26f47858023cf59681882a7"
+#define YANDEX_SECRET "7304c4993583498f8ab63e2f21ad6960"
+#define YANDEX_TENANT NULL
+
#endif /* ALPINE_XOAUTH2_INCLUDED */
diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c
index f930be6..11c5376 100644
--- a/alpine/xoauth2conf.c
+++ b/alpine/xoauth2conf.c
@@ -28,6 +28,7 @@ extern OAUTH2_S alpine_oauth2_list[];
XOAUTH2_INFO_S xoauth_default[] = {
{ GMAIL_NAME, GMAIL_ID, GMAIL_SECRET, GMAIL_TENANT, NULL, NULL},
{ OUTLOOK_NAME, OUTLOOK_ID, OUTLOOK_SECRET, OUTLOOK_TENANT, NULL, NULL},
+ { YANDEX_NAME, YANDEX_ID, YANDEX_SECRET, YANDEX_TENANT, NULL, NULL},
{ NULL, NULL, NULL, NULL, NULL, NULL}
};
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 965e642..425eb1b 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 490 2020-07-09 10:17:35
+Alpine Commit 491 2020-07-09 11:58:15
============= h_news =================
<HTML>
<HEAD>
@@ -199,6 +199,9 @@ problems you find with this release.
the credentials in the XOAUTH2 configuration screen.
<A HREF="h_xoauth2_config_screen">Learn more</A>.
+<LI> Addition of Yandex.com to the list of services that Alpine can use XOAUTH2 to
+ authenticate for reading and sending email.
+
<LI> Addition of a link to the Apache License 2.0 (see above). This is
available from the Release Notes as well as the welcome screen.