<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Authentication and Security on DATATWEETS</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/</link><description>Recent content in Authentication and Security on DATATWEETS</description><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2025 Datatweets</copyright><lastBuildDate>Sun, 28 Jun 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://datatweets.com/courses/fastapi/authentication-and-security/index.xml" rel="self" type="application/rss+xml"/><item><title>Lesson 1 - Security First Steps</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-1-security-first-steps/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-1-security-first-steps/</guid><description>Add authentication the standard way. Learn the OAuth2 password flow, build a /token login endpoint with OAuth2PasswordRequestForm, and require a token on a protected endpoint with OAuth2PasswordBearer.</description></item><item><title>Lesson 2 - Password Hashing and the Current User</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-2-password-hashing-and-current-user/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-2-password-hashing-and-current-user/</guid><description>Make login real and safe. Hash passwords with pwdlib and bcrypt, verify them at the token endpoint, and add a get_current_user dependency that resolves a token to a user and rejects invalid ones with 401.</description></item><item><title>Lesson 3 - JWT Access Tokens</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-3-jwt-access-tokens/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-3-jwt-access-tokens/</guid><description>Replace the placeholder token with a real JSON Web Token. Encode a signed JWT with a subject and expiry using PyJWT, verify it on each request, and reject invalid or expired tokens with a 401.</description></item><item><title>Lesson 4 - Protecting Routes and Scopes</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-4-protecting-routes-and-scopes/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-4-protecting-routes-and-scopes/</guid><description>Authorization, not just authentication. Protect routes by depending on the current user, add role or permission checks as a layered dependency that returns 403, and understand 401 versus 403 — plus where OAuth2 scopes fit.</description></item><item><title>Lesson 5 - Guided Project: Auth-Protected API</title><link>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-5-guided-project-auth-protected-api/</link><pubDate>Fri, 14 Nov 2025 09:00:00 +0200</pubDate><guid>https://datatweets.com/courses/fastapi/authentication-and-security/lesson-5-guided-project-auth-protected-api/</guid><description>The sixth version of the course project: a fully auth-protected Tasks API. Users register with a hashed password, log in for a JWT, and reach protected task endpoints; an admin-only delete shows role-based authorization.</description></item></channel></rss>