Django REST API Tutorial - Token Authentication and Session Authentication #3 (2018)

preview_player
Показать описание
In this django rest api authentication tutorial, you will learn how to use TokenAuthentication and SessionAuthentication and when each approach is appropriate.

7 Tips For Getting Better At Django:

Here you can find more information about REST API authentication:

GitHub repository link:

You will start by setting up an API endpoint to gather the token for a specific username and password combination, and afterwards you will use that token to fetch data from our REST API using the httpie command-line utility.

Anyway, you can find the details in the video and feel free to ask if you have any questions!

The next part will be focused on writing automated tests for our REST API.

If you enjoyed this video, make sure to subscribe and share it with anyone you think could enjoy it as well.

I hope to see you inside of the next episode,

Cheers.
Рекомендации по теме
Комментарии
Автор

There is a module which has been deprecated for django update version. Such as, In "urls.py" "from django.contrib.auth.views import LoginView" should be added or it won't work and in "urlpatterns" of "urls.py" " path('login/', LoginView.as_view(), name='login')" path should be added like this. If anyone is watching this tutorial now then, they have to make this slight changes for making the code work perfectly. Thank You.
And this was an awesome journey with @The Dumbfounds

md.abdullahalmamun
Автор

YOU ARE AWESOME. You truly understand what's going on, hence explaining it thoroughly.

Thank you

FreeDomSy-nkue
Автор

It is just the best full video on internet on auth topic thank you so much

techyguys
Автор

This is one of the best, most straightforward and helpful tutorials I've come across! Liked and subscribed. Cheers.

harperjmusic
Автор

Although there are some problems(all solved now:), this is a helpful video, clear and simple. Thank you sir!

brucemarshall
Автор

Simplest and best tutorial Ive seen about DRF auth thx man

TheSirgo
Автор

perfect tutorial, simple and efficient way to teach.

muzehub
Автор

Really good -- thank you. We loved your SA Accent

UBLAunripped
Автор

Very simple and clear video! Thank you for your work!

vladotrocol
Автор

That's a great tutorial. Thank you sir.

upup
Автор

Do you have any video login in with dja go rest api and volley ?

lolitalolita
Автор

how to allow new users to register? they don't have password and login yet to get token... ?

artemsymcov
Автор

We were just a little confused about what API requests are needed for a NEW user registration -- in your video you created and used the superuser -- would love to know how to do it for a brand NEW user via http - thanks

UBLAunripped
Автор

how can I make the same thing in authentication token, but from a table in my database not the super user table?

amjadelbaba
Автор

How to maintain both authentication for mobile app clients and web app clients, while using http in url, session authentication was working for both mobile and web, after changing to https with ssl configured in Apache web server. Web only working, from mobile apps after login getting 403 error.
...
Thanks

shansodhara
Автор

So is this a way to make the REST API to only be accessible by a specific web app or mobile app?

whichdude
Автор

I got the Token and if i make an http call without the token in header, still its returning 200 success status.. is that the right behavior? Can anyone help me on this?

santhoshkumar-ujtx
Автор

what do you mean by making sure api is under https when using token authentication otherwise people will sniff netwrok

mohammedbayomy
Автор

thank you so much for the video. bu i got problem that says ImportError : cannot import name 'login' .

sangayvlogs
Автор

What even are you saying at the very start of the video? Legit I hear so many things at the same time but none make any sense. Great and wel explained video though!

kilianlegters