Тёмный
No video :(

Working with JWTs in Python 

microapis
Подписаться 1,5 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@jeffgolden3882
@jeffgolden3882 2 года назад
Great video - please keep this kind of content coming. As someone trying to learn more advanced concepts in Python this kind of content is very welcome - even if I don't have a project where I need this exact technology right now. Subscribed and liked.
@microapis
@microapis 2 года назад
Thank you so much for your feedback Jeff!
@fmaciel2
@fmaciel2 Год назад
Excellent video. You teach more about JWTs in this short video than hours of many courses out there. Congrats!
@microapis
@microapis Год назад
Thank you for your kind feedback Francisco!
@ahmadmtera
@ahmadmtera 11 месяцев назад
Glad this exists. Keep up the good work.
@microapis
@microapis 9 месяцев назад
Thank you for your kind words ❤!
@stifferdoroskevich1809
@stifferdoroskevich1809 2 года назад
Nice video!! Thanks for sharing
@microapis
@microapis 2 года назад
Thanks for your kind feedback Stiffer!
@lfcamacho
@lfcamacho 2 года назад
Just discovered your channel! keep the content coming! :)
@microapis
@microapis 2 года назад
Thanks for the nice feedback Luis! I've been quiet for a while but I'll resume posting in the coming weeks!
@ihgnmah
@ihgnmah 2 года назад
Amazing video. Please keep up the good work:
@microapis
@microapis 2 года назад
Thank you for your kind words!
@0ffset925
@0ffset925 2 года назад
great content..thanks!
@microapis
@microapis 2 года назад
Thank you so much for the nice feedback!
@ankitabhatt3330
@ankitabhatt3330 2 года назад
Very nicely explained... Great Content!!! Can you let me know if we use Django framework then in which of it's file should this jwt token be written, i mean in middleware or any custom file that is created??
@microapis
@microapis 2 года назад
Hi Ankita thank you so much for your kind words! The natural place for JWT validation is the middleware, so in Django I'd create a JWT validation middleware. That middleware would validate the JWT token, extract information from it (user ID, claims, etc.), and enrich the request object with this information so that your view functions/methods can use it to validate access to resources and so on. I have a video in which I explain how to do this for FastAPI (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-C92mjEKUfNQ.html) but the approach in Django would be the same. Hope it helps!
@luiscevallos1
@luiscevallos1 2 года назад
how to replace pem files in api rest ?
@microapis
@microapis 2 года назад
Thanks for your question Luis (and btw apologies for answering so late to all your question!). The answer to this is a bit elaborate, but here's the basics: in a REST API you use the contents of the PEM file's public key. Typically, an authorization server has a collection of keys which it uses to sign the tokens. The keys are frequently rotated for security, and they're available to your API under a /.jwks (i.e. JSON Web Keys) endpoint. Each access token has a header with a kid property which is the ID of the key that was used to sign the token. Your API uses the kid to identify the key from the /.jwks endpoint that needs to be used to verify the token's signature. The /.jwks endpoint contains a raw url-encoded representation of each key, which you can load with Python's cryptography library. I hope the explanation helped? I talk about this in my book "Microservice APIs" and I'm planning to write a few posts on this topic and release more videos.
@shyamt739
@shyamt739 Год назад
from where do we get the value of 'sub' in the payload
@microapis
@microapis Год назад
Hi Shyam thanks for your question! When you're validating a JWT, the sub property will be available directly in the validated payload. If you're generating a JWT yourself, the value for sub should be an identifier for the user - typically the user ID from your database. For security, you can encrypt that value to avoid exposing it
Далее
FastAPI with JWT auth tutorial
29:39
Просмотров 6 тыс.
FastAPI with SQLAlchemy Tutorial
40:47
Просмотров 13 тыс.
skibidi toilet zombie universe 40 ( New Virus)
03:06
Просмотров 1,9 млн
API Security Fundamentals [2023]
50:35
Просмотров 1,6 тыс.
Authenticating a Flask API Using JSON Web Tokens
20:33
Просмотров 174 тыс.
Difference between cookies, session and tokens
11:53
Просмотров 617 тыс.
FastAPI Authentication with  JWT (JSON Web Tokens)
56:18
Build APIs with Flask (the right way)
49:09
Просмотров 9 тыс.
Why is JWT popular?
5:14
Просмотров 305 тыс.
What Is JWT and Why Should You Use JWT
14:53
Просмотров 1,1 млн
skibidi toilet zombie universe 40 ( New Virus)
03:06
Просмотров 1,9 млн