ClaimsCookie
An HttpModule that will serialize user information to a chunked protected cookie (with MachineKey) and deserialize on every request to a ClaimsPrincipal. Usage: var user = new List<KeyValuePair<string, object>> { new KeyValuePair<string, object>("name", "John Foo"), new KeyValuePair<string, object>("id", "1234"), new KeyValuePair<string, object>("email", "[email protected]") }; ClaimsCookieModule.Instance.CreateSessionSecurityToken(user); That's it. Now, you will be able to access the user claims like this: ((IClaimsIdentity)User.Identity).Claims The cookie will be chunked in multiple cookies to avoid hitting a limit if you are storing lots of user info and it will be deflated and protected with the machine key.
Install
dotnet add package ClaimsCookie --version 1.1.0
Install-Package ClaimsCookie -Version 1.1.0
<PackageReference Include="ClaimsCookie" Version="1.1.0" />
Frameworks
Dependencies
Adoption guide
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
How to read this guidance
Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.
Useful next steps
Move from package metadata to a concrete selection or review workflow.