curious_sun
curious_sun

Reputation: 21

Authentication with REST Framework Django

I'm new to Django and curious how the authentication of Rest Framework works.

So as I understand, the flow of authentication is: Frontend sends request with username and password > Backend (Django) sends back token > From then on frontend send this token in header to authenticate.

But because anyone can see the header I send, so how is this safe?

Upvotes: 1

Views: 66

Answers (1)

Oliver Lorton
Oliver Lorton

Reputation: 719

For this to be secure you should only ever authenticate over an https connection. When using an https connection the header/token/cookie/whatever will be encrypted.

Upvotes: 1

Related Questions