Completely master JWT with Policy authorization in .NET 8 Web API with Identity Manager🔏

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

/*Grab complete source code*/

/*Playlist*/

/*Related*/

# Here's a follow-up section to encourage engagement and support for Netcode-Hub:
🌟 Get in touch with Netcode-Hub! 📫

# ☕️ If you've found value in Netcode-Hub's work, consider supporting the channel with a coffee!
Рекомендации по теме
Комментарии
Автор

Great job!!!
Just one note. To avoid unused "int Age". You have to change:
1) From:
public class MinAgeRequrement(int Age) : IAuthorizationRequirement {}
To :
public class MinAgeRequrement(int age) : IAuthorizationRequirement
{
public readonly int Age = age;
}

2. From:
public class MinAgeHandler() :
{
...
if (age >= 18)


}
To:
public class MinAgeHandler() :
{
...
if (age >= requirement.Age)


}

A happy coding! 😉

andyash
Автор

Thanks good video.
Please upload the link for the github.

kvelez
Автор

app.post for the API over using Controller. Do you have a video showing this same level of control on API but using Controllers .cs files?

waynehawkins
Автор

How could i handle those exceptions when thrown?

rvrunkillyow
welcome to shbcf.ru