Open begonaalvarezd opened 6 years ago
you should make a login page. and the JSONWebTokenAuthentication info should be pass by front end.
settings.py JWT_AUTH = { JWT_AUTH_COOKIE:"any_short_str_you_like" #jwt mayby a good choice . default is None }
Hello,
I have a Rest API working (all good here) with django-rest-framework and django-rest-framework-jwt. My problem is that I am trying to access the DRF Built-in API documentation for authenticated users only and I am unable to make it work. It throws me 401 error
{u'detail': ErrorDetail(string=u'Authentication credentials were not provided.', code=u'not_authenticated')}
.Below I provide you relevant sections of my code and settings.
Urls:
Settings:
Additionally, my views are restricted to IsAuthenticated:
Any idea what could be happening? Thank you very much!