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

Add API key authentication to channels #57

Open
iiacoban42 opened this issue Feb 1, 2022 · 1 comment
Open

Add API key authentication to channels #57

iiacoban42 opened this issue Feb 1, 2022 · 1 comment
Labels

Comments

@iiacoban42
Copy link
Collaborator

Use API key authentication before upgrading to websocket connection.

@StefanoSperetta
Copy link
Member

This is a great example: https://reza-ta.medium.com/django-channels-web-socket-authentication-approaches-3a56954b4120

It provides 3 separate methods and, personally, I think method 2 (token/api-key in the authentication header) would be the simplest. If we use method 2, we might simply re-use most of the code used for the REST API authentication (even the authentication functions, so it is easier to test them) and leave the websocket completely transparent to authentication.

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

No branches or pull requests

2 participants