Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Master FastAPI from scratch
·
Module 7
Authentication and Authorization
1
Password Hashing with `passlib` vs. Django
Implement password hashing and verification using `passlib`, compared to Django's built-in auth hashers.
2
JWT Authentication: Create and Decode Tokens
Create and decode JWT access tokens for stateless authentication.
3
Secure Login with JWT and OAuth2
Build a login endpoint that returns JWT tokens upon valid credentials using an `OAuth2PasswordRequestForm` dependency.
4
Securing FastAPI with OAuth2 and JWT
Implement a dependency using `OAuth2PasswordBearer` that extracts and validates a JWT from request headers.
5
Securing Routes: Dependency Injection vs. DRF Permissions
Protect routes by injecting the current authenticated user via a dependency, compared to DRF's `permission_classes`.
6
Implementing RBAC with Dependency-Based Permissions
Implement role-based access control (RBAC) using dependencies that check user permissions.
Previous module
The Dependency Injection System
Next module
Modern API Architecture and Project Structure