-
Notifications
You must be signed in to change notification settings - Fork 80
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
Basic Authentication #88
Comments
Browsers, typically, will not allow setting headers to the underlying HTTP request for a WebSocket. So, you will not be able to use Basic Authentication. If you are using Spring for your back-end please check https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#websocket-stomp-authentication-token-based for a mechanism to use headers with CONNECT frame for authentication. Also, please upgrade to newer version of the library for a cleaner interface. https://stomp-js.github.io/guide/ng2-stompjs/2018/11/05/migrate-ng2-stompjs-v7.html and https://stomp-js.github.io/guide/ng2-stompjs/2018/11/04/ng2-stomp-with-angular7.html |
would it be possible to add extra header? |
For example adding an extra header in here : headers: { i supposed this is not a fixed value, right? |
Yes, keys and their values will depend on what the server expects. These need to be strings though. |
i am creating a simple chat application and the chat-api is using websocket to connect and stomp protocol.
but in my case the authentication is using "Basic Authentication".
do you have an idea on how to do it?
thanks,
The text was updated successfully, but these errors were encountered: