Get Authenticated user from token in Django Rest Framework

后端 未结 2 807
陌清茗
陌清茗 2021-02-05 05:01

I am new in Django and I have managed to build a small API using DRF. I have my angular.js client end posting user auth details and DRF returns a token which looks like this:

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-05 05:28

    In my case, I am trying to test my API with an API REST Client. When I put the Header in the configuration, it works.

    Authorization: Token <>
    

提交回复
热议问题