Not everyone needs to view every endpoint on your API. Luckily, DRF provides built-in authentication.
- [Narrator] In this video, we're going to be…talking about authentication with Django REST Framework.…Specifically, we're going to talk about how to…authenticate with Django REST Framework's…built-in authentication classes.…We're also going to show you how to build…your own authentication class,…and what classes Django REST Framework provides.…So let's jump right into some code.…If you look at the code provided with this course…you'll I've added a new file for this video,…API_authentication.…This class is how Django REST Framework uses…its basic authentication.…As you can see, where I'm porting from…Django contrib auth we're using the authentication function.…
This is a built-in from Django.…We're also importing authentication from Django REST…Framework and exceptions from Django REST Framework.…We've created a new class called admin only auth…that inherits from authentication.base authentication.…If you're going to be building a Django REST Framework…authentication class you need to inherit…from this base authentication class.…
- Extending class-based views
- Building a REST API
- Working with GraphQL
- Building a basic schema
- Optimizing your environment
- Working with Pipenv
- How Django handles testing
- Securing the Django admin
Skill Level Advanced
1. Advanced Class-Based Views
2. Building a REST API
Authentication with DRF6m 14s
3. GraphQL: An Alternative API
4. Optimizing Your Environment
5. Tests, Tests, Tests
6. Securing Django
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.