Authentication for testing Communicators
See original GitHub issueI was wondering how it is possible to do authentication with the Communicator
objects (e.g. WebsocketCommunicator
while testing (similar to client.force_login()
for channels 1.x). Nothing is mentioned in the documentation at the moment. Is this available (maybe I missed it somehow) now or planned for the future?
Great job on channels 2.0! 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:22
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Understanding Authentication, Authorization, and Encryption
Usually, authentication by a server entails the use of a user name and password. Other ways to authenticate can be through cards, retina...
Read more >Authenticate to Azure Communication Services - Microsoft Learn
Another type of authentication uses user access tokens to authenticate against services that require user participation. For example, the chat ...
Read more >Testing RADIUS Communication - ID Agent
Testing RADIUS Communication ... execute the program and you should receive a message that either you succeeded or failed against MFA authentication.
Read more >Testing Network Communication - OWASP MASTG
By monitoring the requests between the mobile app client and the backend, you can easily map the available server-side APIs and gain insight...
Read more >4 API authentication methods to better protect data in transit
Protecting API communications has become a top priority for IT security teams as APIs rapidly become a popular target for hackers.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Currently I’m using something like this:
Basically you take the main ASGI app instance and connect to a particular endpoint with the right headers. Then you can send/receive data. Endpoint should be wrapped with
AuthMiddlewareStack
of course.@mapes911 You could also set it outside constructor. I’m using this workaround to set authenticated user:
Feels a bit fragile, but it works. Maybe the auth provider could be simple wrapper/middleware around communicator instead of replacing communicator with different class?