diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-11-21 14:47:24 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-11-21 14:47:24 -0700 |
commit | 974f1dd90d2a5652a764d33c43e472e463db52dd (patch) | |
tree | 5e7522b687ecccd6290e02fbc50c95ffe25fdef0 /alpine/xoauth2info.c | |
parent | 7d652142f4960b679cb5399fc0485470af2cc878 (diff) | |
download | alpine-974f1dd90d2a5652a764d33c43e472e463db52dd.tar.xz |
* Support for code_verifier and code_challenge when generating a
refresh token and access token in Outlook using the S256 method
and plain method (only in the Authorize flow. The Device flow
does not seem to be affected by this modification.)
Diffstat (limited to 'alpine/xoauth2info.c')
-rw-r--r-- | alpine/xoauth2info.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/alpine/xoauth2info.c b/alpine/xoauth2info.c index 79d43e6e..c6cfa4e1 100644 --- a/alpine/xoauth2info.c +++ b/alpine/xoauth2info.c @@ -78,7 +78,7 @@ OAUTH2_S alpine_oauth2_list[] = { {"response_type", "code"}, /* not used */ {"state", NULL}, /* not used */ {"device_code", NULL}, /* only used for frst time set up */ - {"response_mode", "query"}, /* Extra parameter for this server */ + {NULL, NULL}, /* Extra parameter for this server */ {NULL, NULL}, /* Extra parameter for this server */ {NULL, NULL}, /* Extra parameter for this server */ {NULL, NULL} /* Extra parameter for this server */ @@ -115,16 +115,16 @@ OAUTH2_S alpine_oauth2_list[] = { {"response_type", "code"}, {"state", NULL}, /* not used */ {"device_code", NULL}, /* not used */ - {"response_mode", "query"}, /* Extra parameter for this server */ - {NULL, NULL}, /* Extra parameter for this server */ - {NULL, NULL}, /* Extra parameter for this server */ - {NULL, NULL} /* Extra parameter for this server */ + {"code_verifier", NULL}, /* OA2_Extra1: code_verifier, generated by c-client */ + {"code_challenge", NULL}, /* OA2_Extra2: code_challenge, genrated by c-client */ + {"code_challenge_method", "S256"}, /* OA2_Extra3: code_challenge_method, given by Alpine */ + {"login_hint", NULL} /* OA2_Extra4: username, provided by Alpine, filled up by c-client */ }, {{"GET", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/authorize", /* Get Access Code */ - {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_Extra1, OA2_End, OA2_End, OA2_End}}, + {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_Extra2, OA2_Extra3, OA2_Extra4, OA2_End}}, {NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* device code, not used */ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get first Refresh Token and Access token */ - {OA2_Id, OA2_Redirect, OA2_Scope, OA2_GrantTypeforAccessToken, OA2_Secret, OA2_Code, OA2_End, OA2_End}}, + {OA2_Id, OA2_Redirect, OA2_Scope, OA2_GrantTypeforAccessToken, OA2_Secret, OA2_Code, OA2_Extra1, OA2_End}}, {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */ {OA2_Id, OA2_RefreshToken, OA2_Scope, OA2_GrantTypefromRefreshToken, OA2_Secret, OA2_End, OA2_End, OA2_End}} }, |