ClaimsCookie 0.9.5
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", "foo@gmail.com" }
};
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.
See the version list below for details.
Install-Package ClaimsCookie -Version 0.9.5
dotnet add package ClaimsCookie --version 0.9.5
<PackageReference Include="ClaimsCookie" Version="0.9.5" />
paket add ClaimsCookie --version 0.9.5
Dependencies
-
.NETFramework 4.0
- Microsoft.IdentityModel (>= 6.1.7600.16394)
- WebActivatorEx (>= 2.0.1)
-
.NETFramework 4.5
- WebActivatorEx (>= 2.0.1)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.