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

Support for authentication in WebSocket connections #91

Open
artran opened this issue Feb 4, 2020 · 2 comments
Open

Support for authentication in WebSocket connections #91

artran opened this issue Feb 4, 2020 · 2 comments
Assignees

Comments

@artran
Copy link
Contributor

artran commented Feb 4, 2020

Hi,
I'm using this against an endpoint that enforces authorisation in all requests. This is straightforward in the plain HTTP connections but WebSocket works differently - see here for example: https://www.apollographql.com/docs/graphql-subscriptions/authentication/

It would be really helpful if the WebSocketEndpoint constructor allowed a dictionary to be passed that could be used in the connection_init message.

I have forked the project and implemented this (with a test) so if you think it would be useful I can create a pull request for you.

Cheers,
Ray

@barbieri barbieri self-assigned this Feb 4, 2020
@barbieri
Copy link
Member

barbieri commented Feb 4, 2020

sure, send a patch. I didn't write the websocket myself, I thought it was all handled in the ws_options.

@artran
Copy link
Contributor Author

artran commented Feb 4, 2020

I initially thought it would be that way too. Pull request is now added.

Thanks.

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