Skip to main content
ClaimsCookie package icon

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 Dictionary<string, string> { { "name", "John Foo" }, { "id", "1234" }, { "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.

Total Downloads
35.6K
35,592
Published
May 7, 2013
Latest stable version

Install

.NET CLI
dotnet add package ClaimsCookie --version 0.9.6
Package Manager Console
Install-Package ClaimsCookie -Version 0.9.6
PackageReference
<PackageReference Include="ClaimsCookie" Version="0.9.6" />

Frameworks

.NETFramework4.0 .NETFramework4.5

Dependencies

Microsoft.IdentityModel
.NETFramework4.0
[6.1.7600.16394, )
WebActivatorEx
.NETFramework4.0
[2.0.1, )
WebActivatorEx
.NETFramework4.5
[2.0.1, )

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.