Esempio n. 1
0
        public override JObject GetJson()
        {
            var json = new JObject();

            var keys = OpenIDKeysResponse.GetKeys(this.Certs);

            json.Add("keys", JToken.FromObject(keys));

            return(json);
        }
Esempio n. 2
0
        public OpenIDKeysResponse(Binding <JObject> binding)
        {
            if (binding.BindingDirection != this.BindingDirection)
            {
                throw new ArgumentException("Binding has the wrong binding direction for this document");
            }

            var json = binding.GetDocument();

            if (json == null)
            {
                return;
            }

            var keys = json["keys"].ToObject <JwtKey[]>();

            this.Certs = OpenIDKeysResponse.GetCerts(keys);
        }