.NET 6 Web API 🔒 Read JWT Authorization Claims of a User (from a JSON Web Token)

preview_player
Показать описание


Table of Contents:
00:00:00 Intro
00:02:03 Recap of JWT & Role-Based Authorization
00:05:38 Read Claims in the Controller
00:12:19 Use Services & the HttpContextAccessor
00:15:25 Add the HttpContextAccessor
00:19:40 Quick Recap
00:22:37 Outro

🙏MANY THANKS TO THESE LOVELY PEOPLE:
Thomas Werner
István Csibor
Grant Burdon
@gianluigiconti
Gerrit Esmeijer
Illia
Németh-Pók István
Michael Mel
Marko Zdilar
GerryB
@DADA_universe
Domen Hren
@heroesch
Carey
Peter De Tender
Baris Keskin
Someone
@Big_Bear_27390
Mathias
walter e watkins
Günther Dassel
Axel
Josh
Daniel Huber
Fredric Adell
Juan Carlos
Manolis
Pajani
P.
Jonas Granlund
Someone
Bobby
Kristina
@xamarin007

#DotNet #WebAPI #PatrickGod
Рекомендации по теме
Комментарии
Автор

Great Tutorial Patrick, could you please do a tutorial were you combine all this with the Code First Approach tutorial, Registration Login to then accessing methods to create our characters based on the Roles that user has

brandon-mrip
Автор

This has been a great tutorial, incredibly clear!
Would you still reccommend doing this custom rolling of auth vs using something like ASP Identity Core? This seems very straight forward and keep thinking I am missing something!

tehwabbbit
Автор

Liked it before watch. well explained. thank you

mdshaheenhossain
Автор

Vielen Dank für ein weiteres tolles Video :-)

raphaellukas
Автор

I really enjoy your short concise videos, a If I should stumble across your video in YouTube I would like to have a link to part 1 and part 2... maybe?

johnmoseley
Автор

Great job, Patrick! One more excellent video of yours! If I may, I'd like to suggest you to create a YT tutorial about authorization policy factories, explaining when and how to implement. Keep up the good work and congrats :)

vamvdotnet
Автор

for the nullable properties, just edit your csproject file and Remove the <Nullable>enable</Nullable> tag

shucaybmili
Автор

Hi, is it posible to use authoritzation based on claims without identity?

sebastianp
Автор

Amazing videos! could you make a video about how to implement an "account locked for y mins after x amount of failed login tries" with jwt :)

fredrikmoller
Автор

Loved the video.
I like swagger but while developing and testing it slows you down. Instead of calling swagger have you worked with tools like postman, insomnia or the vs code plugin rest-client. They speed up calling api endpoints and even allow you to chain multiple calls and re-use thair responses. It could really simplify some of the demo calls you make.

grumpydeveloper
Автор

Can you guide how to implement RefreshToken in .net Core 6.0 API?
I Refer this video and Previous Video For Authentication and Authorization

zakariyapindhariya
Автор

great job patrick, could you please connect this project with database like sql server, we can take data from db and insert username pasword in db

nagarajutirumalasetti
Автор

Hii Patrick, im follow this couse full section from skillshare "Authentication course". I have one question, if there already custon table for user registration iclude roles and generate token, how to read in client side with httpclient to retrive that token has include roles for authorization.

Can you suggest to me how to do it

Im done with consume web api from client for login and get that token, but not success for authorization

Or anybody can help me, thanks before.

Febrianian
Автор

Patrick can you please make a project management system(like trello or jira but simple) using blazor. Much Appreciated !!!

nisalbandara
Автор

Hi sir nice tutorial thank you please make a video on asp .net core web API and react j s with graphql please 🙏

xavier
Автор

Hey! How about a tutorial authorization with jtw and roles ?:D

kuschizu
Автор

I used this code and got 2 issue, first it is unable to fit the key byte size another JWTtoken is invalid.

rameshchandan
Автор

if i make a controller for role "user" and there's get user personal data,
is there a way for user role to avoid getting someone else data, even tho they have the same role ?

_MoshikoAz_
Автор

i want confirm email and forget password with jwt token

muhammadsobhy
Автор

Hi? Thank you a lot for this video. I need one lecture. Making a db table through blazor dynamically. I tired with onmodelcreating method, but it seems not working. I would like to create each year's table for class members through blazor admin page, then members do CRUD things. May I ask?

goditto