【发布时间】:2020-03-31 11:43:32
【问题描述】:
我正在使用 django-rest-auth 来验证和注册我的用户,我可以做所有事情。
登录正常 注册正常,但我无法访问获取用户详细信息:
/rest-auth/user/ (GET, PUT, PATCH)
我正在尝试访问此端点我正在使用 JWT 我得到了正确的令牌。但是当我在 curl 中使用这个命令时:
curl -X GET http://localhost:8000/rest-auth/user/ -H 'Authorization: Bearer <jwt-toke>'
我收到此错误:
{"detail":"Authentication credentials were not provided."}
我需要做什么才能访问用户的详细信息
【问题讨论】:
标签: django django-rest-framework django-rest-auth