Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to handle OAuth authentication? #457870
02/04/16 18:03
02/04/16 18:03
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
I'm writing a broker plugin for an API that authenticates users with OAuth 2.0. Part of this spec is that the application should have a client ID and client secret and the secret in particular should never be disclosed to the user. The secret is needed for initial authentication and for token refreshing.

This means that for Zorro to support this broker, a web service to authenticate users and refresh their tokens would need to be built (by me) and hosted by Zorro.

Is this something that the Zorro team would accept? The current broker plugins don't appear to require any such service so I thought it worth asking.

Re: How to handle OAuth authentication? [Re: Veratyr] #457891
02/05/16 13:16
02/05/16 13:16
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
What broker is that?

Re: How to handle OAuth authentication? [Re: jcl] #457897
02/05/16 16:11
02/05/16 16:11
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
Technically it's not a broker. Spotware, the guys behind cTrader, have an open API, (Spotware Connect) that gives you access to any account you have linked to your cTID, which can be from any broker that supports cTrader (IC Markets, FxPro, Pepperstone and Tradersway to name a few).

I've got a decent chunk of the work done through a blob of Qt code for the API and Python for the OAuth server but where to put the OAuth server has me wondering if this will work out.

Last edited by Veratyr; 02/08/16 01:44.
Re: How to handle OAuth authentication? [Re: Veratyr] #457971
02/10/16 08:25
02/10/16 08:25
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I am not familiar with OAuth, but if it runs under Linux/Apache we can certainly give it some server space. I only do not really understand why an API plugin needs its own server. When Spotware uses OAuth for their API, then either they or their supported brokers must anyway provide an OAuth server for their clients, or not?

Re: How to handle OAuth authentication? [Re: jcl] #457975
02/10/16 16:02
02/10/16 16:02
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
Great, I should be able to get something working then. It'll likely be a Python script.

The basic reason you need a server is that the API wants to control which applications can access its services as well as which users. The way OAuth does this is by giving the application developer a secret, which must be kept from the user. If the secret could be embedded in the application we wouldn't have this problem but also, a user could extract the secret and use it in their own, unauthorized application, which the API developer is trying to prevent.

It might help to know that the OAuth mechanism offered by Spotware is usually intended for web applications. If you have a website that connects to the Facebook API for example, you'd use a similar authentication mechanism (in fact Facebook and Google use OAuth as well). In this case, all the code that interacts with the API is already running on a server under the control of the developer so this isn't really a problem. You can see that the existing Connect API clients (https://www.spotware.com/partners/open-api-partners) are all web based as well.

Spotware and the brokers don't need OAuth servers because they can use internal APIs. OAuth is only for external developers and it's handled entirely by Spotware, which proxies things through to the brokers.

Last edited by Veratyr; 02/10/16 16:08.
Re: How to handle OAuth authentication? [Re: Veratyr] #462817
10/30/16 08:36
10/30/16 08:36
Joined: Aug 2016
Posts: 3
Victoria
D
dwgfx Offline
Guest
dwgfx  Offline
Guest
D

Joined: Aug 2016
Posts: 3
Victoria
I'm wondering if you've had success in making this happen?


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1