Anonymous User
  Thursday, 03 February 2022
  9 Replies
  1.2K Visits
  Subscribe
Hi !

How I can connect in a socket.io server with bearer token authentication?
Has any documentation or exemple?

I trying this, but I recieve a connection refuse response :


WSClient.Host := '192.168.1.100';
WSClient.Port := 6001;
WSClient.TLS := True;
WSClient.Authentication.Token.AuthToken := token;
WSClient.Active := True;


Thanks!
2 years ago
·
#932
Hello,

The Authentication property must be enabled. Try the following:


WSClient.Host := '192.168.1.100';
WSClient.Port := 6001;
WSClient.TLS := True;
WSClient.Authentication.Enabled := True;
WSClient.Authentication.Basic.Enabled := False;
WSClient.Authentication.Session.Enabled := False;
WSClient.Authentication.URL.Enabled := False;
WSClient.Authentication.Token.Enabled := True;
WSClient.Authentication.Token.AuthToken := token;
WSClient.Active := True;


Kind Regards,
Sergio
2 years ago
·
#933
Thanks!
I connect in host.
And de Channel?
How I can connect to a Channel and listen ?
2 years ago
·
#934
Hello,

Check the following documentation about socket.io message types:

https://www.esegece.com/help/sgcWebSockets/#t=Components%2FAPIs%2FAPI%2FAPI_SocketIO.htm

Kind Regards,
Sergio
2 years ago
·
#935
Thanks!
So.. to connect in ch_test Channel is:

WriteData('42/channel["join", "ch_test');

Right?
2 years ago
·
#936
Hello,

Yes, just replace the single quote of ch_test and it should work


WriteData('42/channel["join", "ch_test"]');


Kind Regards,
Sergio
2 years ago
·
#937
Thanks for support...

When I connect in Channel nothing happens...

Have some method for listen/recieve the Channel messages, ir filter the messages?

Only thing I see in the log is number 3 (pong).

Ops! In doc we have OnHTTPRequest and onAfterConnect but not have any explanetion about the use ...
2 years ago
·
#938
Hello,

The messages received are raised OnMessage event, there is no filtering, maybe the subscription message requires a different format. You can try to inspect with chrome the socket.io messages if you have another web browser client, maybe shows how is subscribing.

Kind Regards,
Sergio
2 years ago
·
#939
What's the limitation of trial version?
I take the survey and get a KEY.

With this key what is the limitation?

Thanks!
2 years ago
·
#940
Hello,

There is a limitation in time, about 30 days.
The CODE provided with the survey, is a discount code if you finally purchase the product, it doesn't affect to the Trial time limit.

Kind Regards,
Sergio
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)