cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] OAUTH 2.0 Bearer token support SMTP/IMAP (XOAUTH2)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 25 Aug 2013 23:00:17 +0200 (CEST)

On Sat, 24 Aug 2013, Kyle L. Huff wrote:

>> 1 - documention for both the curl command line and the libcurl option so
>> that users can figure out how to use this option.
>
> I'd be happy to write documentation for this feature; to clarify, are you
> referring to the documentation in the "docs" folder of the source?

Yes. docs/curl.1 is the curl documentation and docs/libcurl/curl_easy_setopt.3
for the new setopt option.

>> 2 - a test case or three that verify that the feature works as designed and
>> documented. It is particularly important for us to avoid future
>> regressions.
>
> Again, I have no issue doing the work, but I am unclear as to how you want
> these test-cases implemented; something in the tests folder?

Yes. Run 'make test' and you'll see a few hundred tests run. The tests/
directory has a README, there's a FILEFORMAT and runtests.pl has a man page
here: http://curl.haxx.se/dev/runtests.html

Then of course you can check the tests/data/tests[num] files to see how other
tests are implemented.

> Also regarding the tests, it is unlikely a successful test of the token
> functions could be created that would not require the user running the test
> to provide a recent OAUTH Bearer Token. Tokens generally expire in a short
> window of time (typically 1 hour), and are unique to the user account used
> in the connection. Maybe you or someone else has some ideas for a good way
> to design these tests (or perhaps I misunderstand your meaning
> altogether...)

Well, I'm not an expert on OAUTH or your implementation so please correct me
if I'm wrong but are you basically providing the token "as-is" ? We have a
test server and we can pretend that the token you send is fine, so we can have
the test server respond an OK resonse. And we can have it return a reject
response. The tests are written explicitly and we tell the test server exactly
that the response should be in each test, and the test running script makes
sure that curl sends the correct protocol parts and gets the correct stuff
back...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-08-25