private static void WriteData(JsonTextWriter writer, FormsModel model)
        {
            writer
                .StartObject()
                .Property("p", model.IsPersistent, true)
                .Property("e", model.ExpireUtc, DateTimeOffset.MinValue)
                .StartArray("i");

            foreach (var identity in model.Principal.Identities)
            {
                writer
                    .StartObject()
                    .Property("at", identity.AuthenticationType, null)
                    .Property("nct", identity.NameClaimType, ClaimsIdentity.DefaultNameClaimType)
                    .Property("rct", identity.RoleClaimType, ClaimsIdentity.DefaultRoleClaimType)
                    .StartArray("c");

                foreach (var claim in identity.Claims)
                {
                    writer
                        .StartObject()
                        .Property("t", claim.Type, identity.NameClaimType)
                        .Property("v", claim.Value, null)
                        .EndObject();
                }

                writer
                    .EndArray()
                    .EndObject();
            }
        }