Loading include/curl/curl.h +3 −0 Original line number Diff line number Diff line Loading @@ -1553,6 +1553,9 @@ typedef enum { * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), /* The XOAUTH2 bearer token */ CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; Loading include/curl/typecheck-gcc.h +1 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_RTSP_SESSION_ID || \ (option) == CURLOPT_RTSP_STREAM_URI || \ (option) == CURLOPT_RTSP_TRANSPORT || \ (option) == CURLOPT_XOAUTH2_BEARER || \ 0) /* evaluates to true if option takes a curl_write_callback argument */ Loading lib/url.c +15 −0 Original line number Diff line number Diff line Loading @@ -1569,6 +1569,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, result = setstropt(&data->set.str[STRING_PASSWORD], va_arg(param, char *)); break; case CURLOPT_XOAUTH2_BEARER: /* * XOAUTH2 bearer token to use in the operation */ result = setstropt(&data->set.str[STRING_BEARER], va_arg(param, char *)); break; case CURLOPT_POSTQUOTE: /* * List of RAW FTP commands to use after a transfer Loading Loading @@ -2488,6 +2495,7 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->user); Curl_safefree(conn->passwd); Curl_safefree(conn->xoauth2_bearer); Curl_safefree(conn->options); Curl_safefree(conn->proxyuser); Curl_safefree(conn->proxypasswd); Loading Loading @@ -5181,6 +5189,13 @@ static CURLcode create_conn(struct SessionHandle *data, } } if(data->set.str[STRING_BEARER]) { conn->xoauth2_bearer = strdup(data->set.str[STRING_BEARER]); if(!conn->xoauth2_bearer) { return CURLE_OUT_OF_MEMORY; } } #ifndef CURL_DISABLE_PROXY /************************************************************* * Extract the user and password from the authentication string Loading lib/urldata.h +4 −0 Original line number Diff line number Diff line Loading @@ -876,6 +876,8 @@ struct connectdata { char *passwd; /* password string, allocated */ char *options; /* options string, allocated */ char *xoauth2_bearer; /* bearer token for xoauth2, allocated */ char *proxyuser; /* proxy user name string, allocated */ char *proxypasswd; /* proxy password string, allocated */ curl_proxytype proxytype; /* what kind of proxy that is in use */ Loading Loading @@ -1367,6 +1369,8 @@ enum dupstring { STRING_TLSAUTH_PASSWORD, /* TLS auth <password> */ #endif STRING_BEARER, /* <bearer>, if used */ /* -- end of strings -- */ STRING_LAST /* not used, just an end-of-list marker */ }; Loading Loading
include/curl/curl.h +3 −0 Original line number Diff line number Diff line Loading @@ -1553,6 +1553,9 @@ typedef enum { * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), /* The XOAUTH2 bearer token */ CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220), CURLOPT_LASTENTRY /* the last unused */ } CURLoption; Loading
include/curl/typecheck-gcc.h +1 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_RTSP_SESSION_ID || \ (option) == CURLOPT_RTSP_STREAM_URI || \ (option) == CURLOPT_RTSP_TRANSPORT || \ (option) == CURLOPT_XOAUTH2_BEARER || \ 0) /* evaluates to true if option takes a curl_write_callback argument */ Loading
lib/url.c +15 −0 Original line number Diff line number Diff line Loading @@ -1569,6 +1569,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, result = setstropt(&data->set.str[STRING_PASSWORD], va_arg(param, char *)); break; case CURLOPT_XOAUTH2_BEARER: /* * XOAUTH2 bearer token to use in the operation */ result = setstropt(&data->set.str[STRING_BEARER], va_arg(param, char *)); break; case CURLOPT_POSTQUOTE: /* * List of RAW FTP commands to use after a transfer Loading Loading @@ -2488,6 +2495,7 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->user); Curl_safefree(conn->passwd); Curl_safefree(conn->xoauth2_bearer); Curl_safefree(conn->options); Curl_safefree(conn->proxyuser); Curl_safefree(conn->proxypasswd); Loading Loading @@ -5181,6 +5189,13 @@ static CURLcode create_conn(struct SessionHandle *data, } } if(data->set.str[STRING_BEARER]) { conn->xoauth2_bearer = strdup(data->set.str[STRING_BEARER]); if(!conn->xoauth2_bearer) { return CURLE_OUT_OF_MEMORY; } } #ifndef CURL_DISABLE_PROXY /************************************************************* * Extract the user and password from the authentication string Loading
lib/urldata.h +4 −0 Original line number Diff line number Diff line Loading @@ -876,6 +876,8 @@ struct connectdata { char *passwd; /* password string, allocated */ char *options; /* options string, allocated */ char *xoauth2_bearer; /* bearer token for xoauth2, allocated */ char *proxyuser; /* proxy user name string, allocated */ char *proxypasswd; /* proxy password string, allocated */ curl_proxytype proxytype; /* what kind of proxy that is in use */ Loading Loading @@ -1367,6 +1369,8 @@ enum dupstring { STRING_TLSAUTH_PASSWORD, /* TLS auth <password> */ #endif STRING_BEARER, /* <bearer>, if used */ /* -- end of strings -- */ STRING_LAST /* not used, just an end-of-list marker */ }; Loading