Re: Need help setting up oAuth with cURL

2016-10-28 Thread Spencer Hinsdale

Thanks!  I will have a look.  I now remember needing to add cert separately for 
curl.exe, prior to OAuth plugin (non-blocking!).  Thanks again.

> On Oct 28, 2016, at 12:03 AM, Keisuke Miyako  wrote:
> 
> please study the method "HTTPS_DEBUG" provided with the plugin's sample 
> database.
> 
> C_BLOB($in;$out)
> C_LONGINT($err)
> ARRAY LONGINT($tNomOption;0)
> ARRAY TEXT($tValOption;0)
> APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYHOST)
> APPEND TO ARRAY($tValOption;"1")
> 
> APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYPEER)
> APPEND TO ARRAY($tValOption;"1")
> APPEND TO ARRAY($tNomOption;CURLOPT_CAINFO)
> APPEND TO ARRAY($tValOption;Convert path system to POSIX(Get 4D 
> folder(Current resources folder)+"cacert.pem"))
> 
> APPEND TO ARRAY($tNomOption;CURLOPT_DEBUGFUNCTION)
> APPEND TO ARRAY($tValOption;"CB_DEBUG")
> 
> $err:=cURL ("https://www.bigcommerce.com";$tNomOption;$tValOption;$in;$out)
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Need help setting up oAuth with cURL

2016-10-28 Thread Keisuke Miyako
please study the method "HTTPS_DEBUG" provided with the plugin's sample 
database.

C_BLOB($in;$out)
C_LONGINT($err)
ARRAY LONGINT($tNomOption;0)
ARRAY TEXT($tValOption;0)
APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYHOST)
APPEND TO ARRAY($tValOption;"1")

APPEND TO ARRAY($tNomOption;CURLOPT_SSL_VERIFYPEER)
APPEND TO ARRAY($tValOption;"1")
APPEND TO ARRAY($tNomOption;CURLOPT_CAINFO)
APPEND TO ARRAY($tValOption;Convert path system to POSIX(Get 4D folder(Current 
resources folder)+"cacert.pem"))

APPEND TO ARRAY($tNomOption;CURLOPT_DEBUGFUNCTION)
APPEND TO ARRAY($tValOption;"CB_DEBUG")

$err:=cURL ("https://www.bigcommerce.com";$tNomOption;$tValOption;$in;$out)



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Need help setting up oAuth with cURL

2016-10-26 Thread Spencer Hinsdale

Hi Miyako,

I recently tried replacing OAuth.bundle (10/10/14)  with cURL.bundle (9/30/16) 
and ran into a problem with Error 60:
Peer certificate cannot be authenticated with known CA certificates.

I found that I could work around the problem by setting
CURLOPT_SSL_VERIFYPEER
to zero, which didn't seem like a great idea so I reverted :)

I tested against bigcommerce.com and shopify.com, getting the same error, using 
15.2 on El Capitan with Firewall off.  I did not have common-crypto installed.

I would be happy to post code, re-test, etc..

Thanks!

Spencer

> On Oct 26, 2016, at 8:35 AM, Keisuke Miyako  wrote:
> 
> the command names are exactly the same, nothing has changed other than the 
> name of the 2 plugins (the plugin has been split).
> code written for the old plugin will work "as is" with the "curl" and 
> "common-crypto" plugins.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Need help setting up oAuth with cURL

2016-10-26 Thread Keisuke Miyako
ah, you got me there, it's called "Get unixtime" in common-crypto.

unix time is the time passed since 1 January 1970
https://en.wikipedia.org/wiki/Unix_time

> 2016/10/27 1:08、Kirk Brooks  のメール:
> I notice there's one method that's been deleted: SYSTEM Get unixtime
> Easy enough, but does it need to be UTC or local time?



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Need help setting up oAuth with cURL

2016-10-26 Thread Kirk Brooks
Miyako,
Thanks for the reply. I found the presentation you did at the '12 Summit
where you used cURL & oAuth2 to connect to google. I'm working through that
since it details the steps.

I removed the deprecated oAUTH plugin and installed the new cURL and common
crypto.

I notice there's one method that's been deleted: SYSTEM Get unixtime

Easy enough, but does it need to be UTC or local time?

Thanks again.


On Wed, Oct 26, 2016 at 8:35 AM, Keisuke Miyako 
wrote:

> the command names are exactly the same, nothing has changed other than the
> name of the 2 plugins (the plugin has been split).
> code written for the old plugin will work "as is" with the "curl" and
> "common-crypto" plugins.
>

-- 
Kirk Brooks
San Francisco, CA
===
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Need help setting up oAuth with cURL

2016-10-26 Thread Keisuke Miyako
the command names are exactly the same, nothing has changed other than the name 
of the 2 plugins (the plugin has been split).
code written for the old plugin will work "as is" with the "curl" and 
"common-crypto" plugins.

> 2016/10/26 22:31、Kirk Brooks  のメール:
> oAuth plugin is deprecated in favor of cUrl - but I don't see how
> to set the headers properly.



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**