summaryrefslogtreecommitdiff
path: root/imap/src/c-client/auth_bea.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/c-client/auth_bea.c')
-rw-r--r--imap/src/c-client/auth_bea.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c
index b9bf61e..2273b41 100644
--- a/imap/src/c-client/auth_bea.c
+++ b/imap/src/c-client/auth_bea.c
@@ -139,6 +139,11 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder
/* empty challenge or user requested abort or client does not have info */
if(!oauth2.access_token) {
+ if (base){
+ (*responder) (stream,base,"",strlen(base));
+ if ((challenge = (*challenger) (stream,&clen)) != NULL)
+ fs_give ((void **) &challenge);
+ }
(*responder) (stream,NIL,NIL,0);
*trial = 0; /* cancel subsequent attempts */
ret = LONGT; /* will get a BAD response back */
@@ -297,7 +302,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, BEARERNAME, oauth2, tryanother);
+ oauth2->param[OA2_Code].value = (*ogac)(url, method, oauth2, tryanother);
}
if(oauth2->param[OA2_Code].value){