mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
oauth2: Re-factored OAuth 2.0 state variable
This commit is contained in:
parent
d6d58dd558
commit
88702ebb31
@ -1344,7 +1344,7 @@ static void state(struct SASL *sasl, struct connectdata *conn,
|
||||
"GSSAPI",
|
||||
"GSSAPI_TOKEN",
|
||||
"GSSAPI_NO_DATA",
|
||||
"XOAUTH2",
|
||||
"OAUTH2",
|
||||
"CANCEL",
|
||||
"FINAL",
|
||||
/* LAST */
|
||||
@ -1458,7 +1458,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
|
||||
if((enabledmechs & SASL_MECH_XOAUTH2) && ((conn->oauth_bearer) ||
|
||||
(!conn->passwd))) {
|
||||
mech = SASL_MECH_STRING_XOAUTH2;
|
||||
state1 = SASL_XOAUTH2;
|
||||
state1 = SASL_OAUTH2;
|
||||
sasl->authused = SASL_MECH_XOAUTH2;
|
||||
|
||||
if(force_ir || data->set.sasl_ir)
|
||||
@ -1640,7 +1640,7 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
|
||||
break;
|
||||
#endif
|
||||
|
||||
case SASL_XOAUTH2:
|
||||
case SASL_OAUTH2:
|
||||
/* Create the authorisation message */
|
||||
result = sasl_create_oauth_bearer_message(data, conn->user,
|
||||
NULL, 0,
|
||||
|
@ -90,7 +90,7 @@ typedef enum {
|
||||
SASL_GSSAPI,
|
||||
SASL_GSSAPI_TOKEN,
|
||||
SASL_GSSAPI_NO_DATA,
|
||||
SASL_XOAUTH2,
|
||||
SASL_OAUTH2,
|
||||
SASL_CANCEL,
|
||||
SASL_FINAL
|
||||
} saslstate;
|
||||
|
Loading…
Reference in New Issue
Block a user