summaryrefslogtreecommitdiff
path: root/imap/src/c-client/oauth2_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/c-client/oauth2_aux.c')
-rw-r--r--imap/src/c-client/oauth2_aux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c
index 9ff14174..a23f7c28 100644
--- a/imap/src/c-client/oauth2_aux.c
+++ b/imap/src/c-client/oauth2_aux.c
@@ -90,7 +90,8 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method,
char *s = NULL;
JSON_S *json = NULL;
- if(oauth2->param[OA2_Id].value == NULL || oauth2->param[OA2_Secret].value == NULL){
+ if(oauth2->param[OA2_Id].value == NULL
+ || (oauth2->require_secret && oauth2->param[OA2_Secret].value == NULL)){
oauth2clientinfo_t ogci =
(oauth2clientinfo_t) mail_parameters (NIL, GET_OA2CLIENTINFO, NIL);
@@ -98,7 +99,8 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method,
&oauth2->param[OA2_Secret].value);
}
- if (oauth2->param[OA2_Id].value == NULL || oauth2->param[OA2_Secret].value == NULL)
+ if(oauth2->param[OA2_Id].value == NULL
+ || (oauth2->require_secret && oauth2->param[OA2_Secret].value == NULL))
return;
/* Do we have a method to execute? */