gpt4 book ai didi

python - 覆盖 JWT,以便用户可以通过移动设备注册

转载 作者:太空宇宙 更新时间:2023-11-03 18:22:40 26 4
gpt4 key购买 nike

我正在使用JWT使用 Django-rest-framework。如何编写不需要 JSON Web token 以便我的用户可以注册的 APIView?有我可以使用的装饰器吗?

最佳答案

找到了。要将 token 身份验证覆盖到 protected APIViews,请设置 permission_classes = (AllowAny,)

class SomeView(APIView):
permission_classes = (AllowAny,)

关于python - 覆盖 JWT,以便用户可以通过移动设备注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23819411/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com