aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-09-05 17:32:37 +0100
committerSteve Holme <steve_holme@hotmail.com>2015-11-12 18:25:33 +0000
commit88702ebb315a10a12f9cd1f3f0ffdaacc79adfb0 (patch)
treee55e9d5c708929b92a1ee2e4e2473d0bba4e0ac8
parentd6d58dd5580f5737432cae1e65f2023dff2804b6 (diff)
oauth2: Re-factored OAuth 2.0 state variable
-rw-r--r--lib/curl_sasl.c6
-rw-r--r--lib/curl_sasl.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 8ccfac84a..dd2b6bef3 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -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,
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
index a8e0e5cd9..b54d8f46b 100644
--- a/lib/curl_sasl.h
+++ b/lib/curl_sasl.h
@@ -90,7 +90,7 @@ typedef enum {
SASL_GSSAPI,
SASL_GSSAPI_TOKEN,
SASL_GSSAPI_NO_DATA,
- SASL_XOAUTH2,
+ SASL_OAUTH2,
SASL_CANCEL,
SASL_FINAL
} saslstate;