summaryrefslogtreecommitdiff
path: root/imap/src/c-client/auth_oa2.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-08-29 18:58:30 -0600
committerEduardo Chappa <chappa@washington.edu>2020-08-29 18:58:30 -0600
commitf12bfecb345d42bc3b57e76b8f2e71548ceefc16 (patch)
tree23291d9542a79af1b8eb73e00db7248d94c26e7c /imap/src/c-client/auth_oa2.c
parent116585bd28c0dbe4c4663229eb64755545601e6c (diff)
downloadalpine-f12bfecb345d42bc3b57e76b8f2e71548ceefc16.tar.xz
* When a server expires a refresh token, Alpine needs to cancel it
internally. * Fixes to some prototyping for code related to authentication. * Fixes to documentation contributed by Dennis Davis.
Diffstat (limited to 'imap/src/c-client/auth_oa2.c')
-rw-r--r--imap/src/c-client/auth_oa2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/imap/src/c-client/auth_oa2.c b/imap/src/c-client/auth_oa2.c
index f5345bfa..dac87960 100644
--- a/imap/src/c-client/auth_oa2.c
+++ b/imap/src/c-client/auth_oa2.c
@@ -124,10 +124,11 @@ long auth_oauth2_client (authchallenge_t challenger,authrespond_t responder, cha
*/
if(!tryanother
- && (oauth2.access_token
+ && (oauth2.access_token
|| (!RefreshToken && oauth2.param[OA2_RefreshToken].value)
|| (RefreshToken && oauth2.param[OA2_RefreshToken].value
- && strcmp(RefreshToken, oauth2.param[OA2_RefreshToken].value))))
+ && strcmp(RefreshToken, oauth2.param[OA2_RefreshToken].value)
+ || oauth2.cancel_refresh_token)))
mm_login_method (mb, user, (void *) &oauth2, *trial, OA2NAME);
}