-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for 2 Factor Auth for WebDAV (passing certificate + passphrase)? #49
Comments
This library is just a thin wrapper around the command line interface. Any options you pass to the library are passed directly to You can see the command that was executed by inspecting the third argument: > var curl = require('curlrequest')
undefined
> curl.request({ url: 'http://httpbin.org/get' }, function (err, response, meta) {
... console.log(meta);
... });
undefined
> { cmd: 'curl',
args:
[ '--silent',
'--show-error',
'--no-buffer',
'--globoff',
'--url',
'http://httpbin.org/get',
'--location',
'--max-redirs',
3,
'--header',
'Accept: */*',
'--header',
'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'--header',
'Accept-Language: en-US,en;q=0.8',
'--user-agent',
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6' ],
time: 1013 } I'm not sure about the options required to support your specific use-case, but you should be able to play around with library options until you get it right. |
Okay thanks I will mess around with it. So when I specify an option, like the
Like that? Just take whatever the cURL command line option is (https://curl.haxx.se/docs/manpage.html) and remove the double-dashes? Sorry its just not 100% clear to me on how to specify options just yet. Thank you! |
That's right. Options are passed like |
I was looking at #43 but I'm not sure if this is related or not. I was wondering if its possible to specify an SSL certificate and it's passphrase when making a curl connection to a WebDAV server.
If you look at this article:
http://www.qed42.com/blog/using-curl-webdav-two-factor-authentication
It shows exactly how to do this on the command line. I just tested this on OSX and it worked perfectly. You specify an SSL certificate and it's keyphrase/passphrase along with the typical username/password when making the connection.
Is the same thing is possible with this library? Can you pass the cert and passphrase as curl options or something?
The text was updated successfully, but these errors were encountered: