.Net 8 API Role Based Authorization

  Рет қаралды 5,810

ScriptBytes

ScriptBytes

Күн бұрын

Learn how to add role based authorization to your .Net 8 API using the IClaimsTransformation interface. This is a great way to protect your .Net API routes based on whether your user has specific roles.
Microsoft docs for IClaimsTransformation:
learn.microsof...
Github Repo with code from this video:
github.com/Scr...
Follow me on social media!
Instagram: / scriptbytes
Threads: www.threads.ne...
Check out my blog!
scriptbytes.io/

Пікірлер: 5
@artemvolsh387
@artemvolsh387 6 ай бұрын
Thanks, great content, easy to understand and follow!
@waynehawkins654
@waynehawkins654 3 ай бұрын
Nice. Love to see how to use JWT into this. I watch many videos and I always get a 404 not found. I sign in, and the API returns the JWT. I sigin into the API (top right) with Bearer {and token id}. And then try to access a Authorize http and bingo - I get 404 not 200 or 401. I'm going slowly crazy.
@scriptbytes
@scriptbytes 3 ай бұрын
That is a little weird. I'm not sure why you would get a 404. If you add [AllowAnonymous] to whichever endpoint you're calling (just for a quick test), does that change anything?
@kavindu_prabhashitha
@kavindu_prabhashitha 5 ай бұрын
Thanks a lot, for Explaining it simply 🤩
@scriptbytes
@scriptbytes 4 ай бұрын
Thanks for watching!
Memory Cache in Dotnet API
8:28
ScriptBytes
Рет қаралды 387
ASP.NET Core JWT Authentication and role-based authorization
39:17
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 54 МЛН
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 84 МЛН
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 74 М.
.NET Framework vs .NET Core vs .NET vs .NET Standard vs C#
25:14
IAmTimCorey
Рет қаралды 557 М.
ASP.NET Core - Roles vs Claims vs Policy
23:11
Raw Coding
Рет қаралды 98 М.
Manually Deploy to Cloud Run - Updated for Artifact Registry
11:04
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 54 МЛН