From 7023d8aa370db83daa3b6f3067d60302098aa157 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 4 Nov 2015 07:20:21 +0000 Subject: oauth2: Don't use XAUTH2 in OAuth 2.0 function name --- lib/curl_sasl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index ad3b3721f..49a51baf9 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -1154,7 +1154,7 @@ void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm) #endif /* USE_NTLM && !USE_WINDOWS_SSPI*/ /* - * sasl_create_xoauth2_message() + * sasl_create_oauth_bearer_message() * * This is used to generate an already encoded OAuth 2.0 message ready for * sending to the recipient. @@ -1170,10 +1170,10 @@ void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm) * * Returns CURLE_OK on success. */ -static CURLcode sasl_create_xoauth2_message(struct SessionHandle *data, - const char *user, - const char *bearer, - char **outptr, size_t *outlen) +static CURLcode sasl_create_oauth_bearer_message(struct SessionHandle *data, + const char *user, + const char *bearer, + char **outptr, size_t *outlen) { CURLcode result = CURLE_OK; char *xoauth = NULL; @@ -1450,9 +1450,9 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, sasl->authused = SASL_MECH_XOAUTH2; if(force_ir || data->set.sasl_ir) - result = sasl_create_xoauth2_message(data, conn->user, - conn->oauth_bearer, - &resp, &len); + result = sasl_create_oauth_bearer_message(data, conn->user, + conn->oauth_bearer, + &resp, &len); } else if(enabledmechs & SASL_MECH_LOGIN) { mech = SASL_MECH_STRING_LOGIN; @@ -1629,8 +1629,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, case SASL_XOAUTH2: /* Create the authorisation message */ - result = sasl_create_xoauth2_message(data, conn->user, - conn->oauth_bearer, &resp, &len); + result = sasl_create_oauth_bearer_message(data, conn->user, + conn->oauth_bearer, &resp, &len); break; case SASL_CANCEL: /* Remove the offending mechanism from the supported list */ -- cgit v1.2.3