Authentication and Authorization in Blazor
summary
Shows a working Blazor Server and Blazor WebAssembly security stack that uses IdentityServer4 plus ASP.NET Core Identity and oidc-client.js to authenticate, and demonstrates requesting access tokens and calling a protected Web API with an automatic AuthorizationMessageHandler. Exposes a surprising one gotcha: role claims arrive as a JSON array and require a custom AccountClaimsPrincipalFactory to split them. Builds a centralized permission model backed by a permissions JSON file and middleware, and the demos run end to end.
AI-written summary · about
chapters (24)
- 0:00Introduction
- 1:22Agenda
- 3:09Object Model
- 4:48Authorization Root View
- 6:28Authentication State Provider
- 7:44Blazor Server
- 9:48Providers
- 10:16Demo
- 14:15Blazor Web Assembly
- 17:56Supported Providers
- 18:30Blazor
- 23:33Access Tokens
- 25:49How it works
- 31:49Roles
- 33:47Implementing Roles
- 38:44Blazor Claims Principle Factory
- 42:42The Problem with Roles
- 48:04The Solution
- 48:44Identity Server
- 49:19Weather API
- 49:49Permissions middleware
- 50:34Blazor example
- 51:59Blazor authorization policy provider
- 53:09Blazor custom array claims
related talks
01h 00mBlazor Authentication? Hold My Beer!
51mAuthentication and Authorization in ASP.NET Core 2
28mMicrosoft, Google and Cookie Authentication and Authorization
36mFlexible Authorisation with ASP.NET Core 7.0
59mThe whirlwind tour of Authentication and Authorization with ASP.NET Core
47mDeveloping Flexible Authorisation Capabilities in ASP.NET Core
01h 04mImplementing Authentication and Authorization with ASP.NET Core 2
58mLet's talk Auth
