oauth2: Don't use XAUTH2 in OAuth 2.0 function name
This commit is contained in:
@@ -1154,7 +1154,7 @@ void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm)
|
|||||||
#endif /* USE_NTLM && !USE_WINDOWS_SSPI*/
|
#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
|
* This is used to generate an already encoded OAuth 2.0 message ready for
|
||||||
* sending to the recipient.
|
* sending to the recipient.
|
||||||
@@ -1170,10 +1170,10 @@ void Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm)
|
|||||||
*
|
*
|
||||||
* Returns CURLE_OK on success.
|
* Returns CURLE_OK on success.
|
||||||
*/
|
*/
|
||||||
static CURLcode sasl_create_xoauth2_message(struct SessionHandle *data,
|
static CURLcode sasl_create_oauth_bearer_message(struct SessionHandle *data,
|
||||||
const char *user,
|
const char *user,
|
||||||
const char *bearer,
|
const char *bearer,
|
||||||
char **outptr, size_t *outlen)
|
char **outptr, size_t *outlen)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
char *xoauth = NULL;
|
char *xoauth = NULL;
|
||||||
@@ -1450,9 +1450,9 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
|
|||||||
sasl->authused = SASL_MECH_XOAUTH2;
|
sasl->authused = SASL_MECH_XOAUTH2;
|
||||||
|
|
||||||
if(force_ir || data->set.sasl_ir)
|
if(force_ir || data->set.sasl_ir)
|
||||||
result = sasl_create_xoauth2_message(data, conn->user,
|
result = sasl_create_oauth_bearer_message(data, conn->user,
|
||||||
conn->oauth_bearer,
|
conn->oauth_bearer,
|
||||||
&resp, &len);
|
&resp, &len);
|
||||||
}
|
}
|
||||||
else if(enabledmechs & SASL_MECH_LOGIN) {
|
else if(enabledmechs & SASL_MECH_LOGIN) {
|
||||||
mech = SASL_MECH_STRING_LOGIN;
|
mech = SASL_MECH_STRING_LOGIN;
|
||||||
@@ -1629,8 +1629,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
|
|||||||
|
|
||||||
case SASL_XOAUTH2:
|
case SASL_XOAUTH2:
|
||||||
/* Create the authorisation message */
|
/* Create the authorisation message */
|
||||||
result = sasl_create_xoauth2_message(data, conn->user,
|
result = sasl_create_oauth_bearer_message(data, conn->user,
|
||||||
conn->oauth_bearer, &resp, &len);
|
conn->oauth_bearer, &resp, &len);
|
||||||
break;
|
break;
|
||||||
case SASL_CANCEL:
|
case SASL_CANCEL:
|
||||||
/* Remove the offending mechanism from the supported list */
|
/* Remove the offending mechanism from the supported list */
|
||||||
|
|||||||
Reference in New Issue
Block a user