From the course: Building Angular and Django Apps
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Setting up Authentication with Django OAuth Toolkit
From the course: Building Angular and Django Apps
Setting up Authentication with Django OAuth Toolkit
- [Instructor] Our app is designed for administrators and tour operators to use. This means we're going to need authentication. Django OAUTH Tool Kit provides an easy way to add OAUTH token based authentication. We need to update the middleware setting in our settings pi file. And we add oauth2_provider.middleware. And then we need to find the authentication backend setting. We're going to remove the no authentication backend that we've been using. And we're going to insert an oauth2_provider.backend. We must configure the oauth2 provider, specifically the backend class because we are going to be using JSON data payloads with this rest API server. And then we have to configure Django rest framework to no longer use the no authentication backend and instead to use the oauth2_provider rest framework specific oauth2 authentication.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Setting up Authentication with Django OAuth Toolkit1m 23s
-
(Locked)
Using scopes with Django OAuth Toolkit for permissions1m 34s
-
(Locked)
Registering a new OAuth application with Django OAuth Toolkit1m 24s
-
(Locked)
Logging in and authentication with Angular and HttpClient5m 4s
-
(Locked)
Using OAuth headers with Angular and HttpClient1m 20s
-
(Locked)
Authentication storage with Angular1m 28s
-
(Locked)
-
-
-
-