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

How to pass an access token #201

Open
QuentinGrange opened this issue Mar 26, 2024 · 3 comments
Open

How to pass an access token #201

QuentinGrange opened this issue Mar 26, 2024 · 3 comments

Comments

@QuentinGrange
Copy link

Hello!

Your package looks great! However, I'm having some trouble using it. How do I pass my authentication token?

Thanks in advance for your response. I plan to use the package seriously and would be happy to contribute to the documentation.

@hishnash
Copy link
Member

What is your goal here?

To set a auth header/cookie or to send a WS message with this?

@justin096
Copy link

This package don't support authentication, you cloud get it in README. But I think it will be popular package after adding auth

@hishnash
Copy link
Member

hishnash commented Dec 2, 2024

The consumers do support permission classes https://djangochannelsrestframework.readthedocs.io/en/latest/mixins.html

Such as

class LiveConsumer(ListModelMixin, GenericAsyncAPIConsumer):
    queryset = models.Test.objects.all()
    serializer_class = serializers.TestSerializer
    permission_classes = (permissions.IsAuthenticated,)

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

3 participants