.NET 7 Web API 🔒 Role-Based Authorization with JSON Web Tokens (JWT) & the dotnet user-jwts CLI

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


💡 Udemy Online Courses:

Table of Contents:
00:00 .NET 7 Web API 🔒 Role-Based Authorization with JSON Web Tokens
00:12 Secure Your Web API with the [Authorize] Attribute
02:49 Configure Your Web API to use JSON Web Tokens
05:26 Use the new dotnet user-jwts CLI of .NET 7
10:20 First Test with Swagger
10:37 Configure Swagger to provide a JWT
13:25 Use a Token from the dotnet user-jwts CLI
14:00 Add Roles
16:50 Validate the Issuer Signing Key
22:28 Set a Role using Claims

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

🚀 Join the .NET Web Academy with a 30% discount - closing soon!

PatrickGod
Автор

Great video, Patrick! Any chances to have a video teaching the basics of Identity Framework with MVC?

joaogabrielv.m
Автор

Your tutorials are very helpful and easy to understand

ynkdqe
Автор

Hi, if anyone gets the error while create jwt token as "dotnet : No project found at `-p|--project` path or current directory.", make sure you run above command inside the project folder not on the root folder (solution level), it requires to be in the same project file folder; hope this helps ):

akbaralimajeed
Автор

Great video! Can you make a video with simple CQRS implementation?

Avster
Автор

Nice... I didn't know u could gen keg with dotnet command

ivandrofly
Автор

Your videos are 5-stars :)
Just a hint about issue with invalid SignInKey while using user-jwts generated token (20:36 in video), in the application instead of decoding key into UTF8 it is required to docode it as base64 and it will work.

rpxzjlc
Автор

Make more videos about authentication please. Thanks

rezach
Автор

I cannot get it to accept the token, no matter what i do in jwt if i enable the secret code.

shikkicodes
Автор

Hi teacher can you cover OpenIddict library in detail?

dindjarin
Автор

I just watched and implemented the .NET 6 Web API Authorization and now I see there is a new one haha what are the chances

ViktorTy
Автор

can someone tell me what patrick did at 11:04 coz im not using swagger from start, are there any other possible ways to do that?

thegamer
Автор

Id do every thing like you, but the lock in the weather methode stills opened & return unauthorized error, why??

abdulhakimawad
Автор

Once a user is logged in how is the token being stored to maintain the user state?

thomasdevelopment
Автор

I've done all of the auth completly in my app. my problem is i want to make my client app to send authorization into the server api, so i wont, manually copy and past token bearer in swagger. how can i fix this? what is the name of this topic? i'm new in the field. thanks.

ndrcreates
Автор

Hey, great video, sadly my generated token still generates 401 error, any ideas?

godizord
Автор

Someone help me please. when I execute dotnet user-jwts create in console, this show me that error: dotnet : No project found at `-p|--project` path or current directory.
At line:1 char:1
+ dotnet user-jwts create
+
+ CategoryInfo : NotSpecified: (No project foun...rent directory.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

jesusnaun
Автор

I get an error while using the dotnet user-jwts create and the error I get is :
dotnet : No project found at `-p|--project` path or current directory.
At line:1 char:1
+ dotnet user-jwts create
+
+ CategoryInfo : NotSpecified: (No project foun...rent directory.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Can you please tell me the solution for this ?

tanishbansal
Автор

how to create token based on new login?

vishalsinghal