>
> void Bearer::Authenticate(CURL* pCurl) const
>
> {
>
> CURLcode c = CURLE_OK;
>
>
>
> std::cerr << "Warning: memory set with CURLOPT_XOAUTH2_BEARER is known
> to leak." << std::endl;
>
>
>
> // This libcurl code works, but leaks the bearer token.
>
> // https://github.com/curl/c
On Tue, Feb 21, 2023 at 03:19:12AM +, Matthew Bobowski wrote:
> No cast is necessary.
>
> #define CURLAUTH_BEARER (((unsigned long)1)<<6)
Ah, good. Many of the other contants (like CURLSSH_AUTH_* and CURLFTPAUTH_*)
*do* need that cast.
--
Unsubscribe: https://lists.haxx.se/listinfo/cur
rary@lists.haxx.se<mailto:curl-library@lists.haxx.se>
Cc: Dan Fandrich<mailto:d...@coneharvesters.com>
Subject: Re: CURLOPT_XOAUTH2_BEARER use?
On Tue, Feb 21, 2023 at 03:01:53AM +, Matthew Bobowski via curl-library
wrote:
> c = curl_easy_setopt(pCurl, CURLOPT_HTTPAUTH, C
On Tue, Feb 21, 2023 at 03:01:53AM +, Matthew Bobowski via curl-library
wrote:
> c = curl_easy_setopt(pCurl, CURLOPT_HTTPAUTH, CURLAUTH_BEARER);
Don't forget to cast this to a long; this makes a difference in some
environments.
Dan
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-lib
Id=550986> for Windows
From: Gavin Henry via curl-library<mailto:curl-library@lists.haxx.se>
Sent: Monday, February 20, 2023 6:46 PM
To: libcurl development<mailto:curl-library@lists.haxx.se>
Cc: Gavin Henry<mailto:ghe...@sentrypeer.org>
Subject: Re: CURLOPT_XOAUTH2_BEARE
>
> In the absence of your code listing and lack of additional info, I can
> only try to guess...
>
> - Protocol is http(s)
>
> . You do not set CURLOPT_HTTPAUTH (
> https://curl.se/libcurl/c/CURLOPT_HTTPAUTH.html). This is probably what
> you need.
>
Thanks! I did my first version today, but this
On 2/20/23 15:25, Gavin Henry via curl-library wrote:
If I do the usual, then all is good: > > headers = curl_slist_append(headers, "Authorization: Bearer >
xx"); > Yes, that just forces it!
I must be missing setting another curl_easy_setopt... >
In the absence of your code listing and
If I do the usual, then all is good:
headers = curl_slist_append(headers, "Authorization: Bearer xx");
I must be missing setting another curl_easy_setopt...
Thanks.
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
> The code search seems to be a beta github feature: I do not have access
to it and as all betas, it may still be incomplete.
>
> Running on my local clone, I get:
>
> $ find lib include -type f | xargs grep -F CURLOPT_XOAUTH2_BEARER
> lib/easyoptions.c: {"XOAUTH2_BEARER", CURLOPT_XOAUTH2_BEARER,
On 2/20/23 12:57, Gavin Henry via curl-library wrote:
Hi all,
I'm reading https://curl.se/libcurl/c/CURLOPT_XOAUTH2_BEARER.html but
can't seem to see the header at all or find any code at
https://github.com/curl/curl/search?q=CURLOPT_XOAUTH2_BEARER
The code search seems to be a beta github
Hi all,
I'm reading https://curl.se/libcurl/c/CURLOPT_XOAUTH2_BEARER.html but can't
seem to see the header at all or find any code at
https://github.com/curl/curl/search?q=CURLOPT_XOAUTH2_BEARER
For example?
res = curl_easy_setopt(
curl, CURLOPT_XOAUTH2_BEARER,
"zxczx");
11 matches
Mail list logo