ASP.NET Core 8.0 - Cookies And Claims Project
One of my most popular articles is ASP.NET Core 3.1 - Users Without Identity which describes a cookie authentication scheme without the Authentication Type - Individual Accounts (ASP.NET Core Identity framework) template. I developed the Cookies And Claims Project (CACP) to demonstrate a simple cookie authentication scheme and claim-based authorization with a clear and modifiable design by implementing two hard coded users. The CACP is developed with Visual Studio 2022 and the MS Long Term Support (LTS) version .NET 8.0 framework. All Errors, Warnings, and Messages from Code Analysis have been mitigated.
Attempts to browse pages protected by authentication before logging in redirects to the Login page. A successful login creates a ClaimsPrincipal with the NameIdentifier and Name ClaimTypes. The Name claim is read and displayed by the _LoginPartial.cshtml partial view in the /Pages/Shared folder. The Administrator login adds a custom Administrator ClaimType to the ClaimsPrincipal. The Administrator ClaimType is required to access pages in the /Pages/Admin folder. If the Member login attempts to browse the Admin page, the user is redirected to the Access Denied page.
The first project I published back in 2019, was the ASP.NET Core 2.2 - Bootstrap Native Project (BNP). The BNP implemented Bootstrap Native and form validation with native JavaScript rather than jQuery. I developed, refactored, and implemented utilities in all my projects with Bootstrap Native and native JavaScript since. The CACP implements utilities like an AES Cipher, Password Hasher, native JavaScript client form validation, password requirements UI, Bootstrap Native message modal generator, loading/spinner generator, SignalR online user count, and an automatic idle logout for users with administration permissions.
V1.1.1 - MIT License - Free Access Fee - CookiesAndClaimsProject@1.1.1.zip - 2,118,352 bytes
Not accepting new comments.
Your comment has been submitted.
You will be emailed when approved.
Submit your comment. Comments are moderated.
DisplayedName - Member Since ?
Change Log
-- Updated AspNetCore.Identity.UI@8.0.8
-- Updated BootstrapeNative@5.0.13
-- Updated Identity V3 specifications
-- Updated Manage Account page
-- Implemented PasswordHasherV3
-- Implemented BuildBundlerMinifier
v1.1.0 - 2024-07-15
-- Updated AspNetCore.Identity.UI@8.0.7
-- Implemented Remember Me Options
-- Implemented UserService
-- Migrated AppUsers to JSON files
-- Trimmed Login Name
-- Updated UI
v1.0.0 - 2024-06-22
-- Initial Release
Comments(0)