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

Can we pass "Authorization : Bearer token" in startUpMessage #25

Open
Piyush12011990 opened this issue Nov 24, 2021 · 1 comment
Open

Comments

@Piyush12011990
Copy link

Actually I have two issues

  • Can we pass "Authorization : Bearer token" in startUpMessage
  • To verify message on websocket, I need connection to be establish 1st and it should be listening on specific topic for upcoming messages, Then I will hit one API to modify something and that modified message will be viewed on websocket.

Please let me know if it is possible

@dsebastian
Copy link
Contributor

Hi @Piyush12011990 . Unfortunately you can't as this in an issue with WS api in general. See here:
https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api#:~:text=You%20cannot%20add%20headers%20but,key1%3Dvalue1%26key2%3Dvalue2%22)%3B

For authentication it's recommended you use the startupmessage to send the payload and pick that up on the server.

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