manaty / octopus

OctopuSync plateform
GNU Affero General Public License v3.0
0 stars 0 forks source link

Cortex integration #4

Open atomashpolskiy opened 5 years ago

atomashpolskiy commented 5 years ago

See in Wiki

atomashpolskiy commented 5 years ago

Oh, and one more thing. Event timestamps are in seconds since Cortex startup (!)

atomashpolskiy commented 5 years ago

I realized that I don't quite understand, why clientId/clientSecret are needed during the login procedure. Thing is, there is a user account in Emotiv, which you log in into by providing username and password. A user may have multiple "Cortex apps", which are, basically, access tokens: https://www.emotiv.com/my-account/cortex-apps/ (by the way, no clientSecret there, only clientId). In my view, it would be logical to provide only username and password during the login, and then provide clientId/clientSecret in the authorize request. But whatever.

atomashpolskiy commented 5 years ago

Also, in official docs there is inconsistency between sections https://emotiv.github.io/cortex-docs/#querysessions and https://emotiv.github.io/cortex-docs/#session-object, e.g.:

manaty commented 5 years ago

Can you contact Emotiv support for those questions ?

atomashpolskiy commented 5 years ago

Sure, but I hope that we'd be able to figure out some of these ourselves, and if any questions remain unclear after tests, I'll make sure to contact Emotiv support.

Reminder for myself on some of the probable errors, which we should test:

1) Invalid Emotiv credentials 2) Authz token expires (must refresh and continue) 3) Headset gets unplugged (this one is unclear, need to check on real Cortex) 4) Cortex server gets restarted (this one includes starting Cortex after Octopusync) 5) Octopusync restart (auth/authz procedure; restoring state of Cortex sessions; termination of subscriptions by Cortex)

Also this, but we probably don't need to check/test it at the moment: 6) Existence of sessions (for test headsets), owned by another user