Exemple #1
0
        public void SetParameters()
        {
            var jsonWebKey = GetSecurityKey();
            var test       = PublicJsonWebKey.FromJwk(jsonWebKey);

            Parameters = JsonSerializer.Serialize(PublicJsonWebKey.FromJwk(jsonWebKey), new JsonSerializerOptions()
            {
                IgnoreNullValues = true
            });
        }
        public void Revoke()
        {
            var jsonWebKey   = GetSecurityKey();
            var publicWebKey = PublicJsonWebKey.FromJwk(jsonWebKey);

            IsRevoked  = true;
            Parameters = JsonSerializer.Serialize(publicWebKey.ToNativeJwk(), new JsonSerializerOptions()
            {
                IgnoreNullValues = true
            });
        }
Exemple #3
0
    public void Revoke()
    {
        var jsonWebKey   = GetSecurityKey();
        var publicWebKey = PublicJsonWebKey.FromJwk(jsonWebKey);

        ExpiredAt  = DateTime.Now;
        IsRevoked  = true;
        Parameters = JsonSerializer.Serialize(publicWebKey.ToNativeJwk(), new JsonSerializerOptions()
        {
            DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
        });
    }