This topic contains 3 replies, has 2 voices, and was last updated by Klaus Schrödl 2 years, 5 months ago.
-
AuthorPosts
-
August 22, 2018 at 1:00 am #16621
Hi Everyone,
I’m looking into interfacing our Omnis mobile app with the Xero online accounting system. Xero uses OAuth for authentication.
Has anyone implemented OAuth in Studio? I tried searching on the list archive, but the search option isn’t there anymore …
A man rushed into the doctor’s office and shouted, “Doctor! I think I’m shrinking!”
The doctor calmly responded, “Now, settle down. You’ll just have to be a little patient.”Paul W. Mulroney
We Don't Do Simple Pty Ltd
ACN 161 009 374
Bentley Western Australia 6102August 22, 2018 at 9:31 am #16622Hi Paul,
the Omnis list is being mirrored on this site:
https://developer.omnis.net/omnislistIt’s fully searchable with the widget in the right pane or at the page bottom in the mobile version.
Klaus
Cheers
Klaus
October 3, 2018 at 4:58 am #17123Hi Everyone,
A quick update:
We’ve been able to get it working, using a HTTP Worker object, and a command line call to openSSL. There’s an Authorisation header that contains the URL of the request and a number of other fields. This is then signed using RSA-SHA1 and sent as part of the request.
This is our two lines of code that do the magic:
Calculate vsScript as con('cmd ',kDq,'/c ',kDq,kDq,isOpenSSLPath,kDq,' dgst -sha1 -sign ',kDq,vsKeyFile,kDq,' ',kDq,vsSrcFile,kDq,' | ',kDq,isOpenSSLPath,kDq,' base64 -A',kDq,kDq)
Launch program [vsScript] Returns vsSignature (Do not quit Omnis)
It basically does the following on the command line:
/path/to/openssl.exe dgst -sha1 -sign "/path/to/key/file" "/path/to/request" | "/path/to/openssl.exe" base64 -A
I don’t think this is a good long-term solution, because we’d be constantly opening a command window to run the signing/base64 conversion
I believe that Python has a lib that will allow us to do the same thing, but I have no idea how to call it from within Omnis.
Has anyone tried to sign something using RSA-SHA1 in Omnis? How do you do it?
Perhaps while you’re at EurOmnis, someone can figure out a quick and dirty hack for us!!
A man rushed into the doctor’s office and shouted, “Doctor! I think I’m shrinking!”
The doctor calmly responded, “Now, settle down. You’ll just have to be a little patient.”Paul W. Mulroney
We Don't Do Simple Pty Ltd
ACN 161 009 374
Bentley Western Australia 6102October 3, 2018 at 9:26 am #17135Hi Paul,
great to hear, you solved the issue. Thank you for posting the solution!
-
This reply was modified 2 years, 5 months ago by
Klaus Schrödl.
Cheers
Klaus
-
This reply was modified 2 years, 5 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.