Skip to content
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

connect with auth - error #25

Open
aviolide opened this issue Mar 11, 2018 · 3 comments
Open

connect with auth - error #25

aviolide opened this issue Mar 11, 2018 · 3 comments

Comments

@aviolide
Copy link

aviolide commented Mar 11, 2018

try connect with apikey and apisecret to wss://sc-02.coinigy.com/socketcluster/.
in Socket.java change connection code -

            `JSONObject handshakeObject=new JSONObject();
            handshakeObject.put("event","#handshake");

            JSONObject obj = new JSONObject();
            obj.put("apiKey", "api");
            obj.put("apiSecret", "secret");

            JSONObject object=new JSONObject();
            object.put("authToken",obj.toString());
            handshakeObject.put("data",object);
            handshakeObject.put("cid",counter.getAndIncrement());
            websocket.sendText(handshakeObject.toString());`

and return - {"authError":{"name":"AuthTokenInvalidError","message":"jwt malformed"},"pingTimeout":20000,"id":"v45cx9vKX-xQXD1BAGmo","isAuthenticated":false}
as i understand - it because the authtoken dont encode by jwt, can u provide the sample of working code with api auth?

@aviolide
Copy link
Author

i find the issue. the library is not designed to make secure connection. api and secret must be encoded with JWT. but if you do the correct auth, the async between request is broken

@sacOO7
Copy link
Owner

sacOO7 commented Mar 17, 2018

Hi @Desided , Can you please take a look here for solution
#17. I am pretty sure it is supposed to work.
Please let me know if you have any other issues. If you are facing any other problem, I will directly put working code in here....

@sacOO7
Copy link
Owner

sacOO7 commented Jun 1, 2018

HI @Desided , the issue is probably due to coinigy server problem. They have shut it down due to some load balancing issues. You will find more details here Coinigy/api#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants