ClaimsCookie 0.9.3
See the version list below for details.
dotnet add package ClaimsCookie --version 0.9.3
NuGet\Install-Package ClaimsCookie -Version 0.9.3
<PackageReference Include="ClaimsCookie" Version="0.9.3" />
paket add ClaimsCookie --version 0.9.3
#r "nuget: ClaimsCookie, 0.9.3"
// Install ClaimsCookie as a Cake Addin #addin nuget:?package=ClaimsCookie&version=0.9.3 // Install ClaimsCookie as a Cake Tool #tool nuget:?package=ClaimsCookie&version=0.9.3
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- Microsoft.IdentityModel (>= 6.1.7600.16394)
- WebActivatorEx (>= 2.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.