oauth2: Don't use XAUTH2 in OAuth 2.0 function name

This commit is contained in:
Steve Holme 2015-11-04 07:20:21 +00:00
Родитель eaa98cef8d
Коммит 7023d8aa37
1 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -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 */