Example #1
0
        public async Task <string> ToJsonAsync(RsaPublicKey sigPubKey)
        {
            var jwt = await RetrieveUriContentsAsync(RequestUri);

            if (Util.IsCompactJwe(jwt))
            {
                return(CONTENT_IS_ENCRYPTED);
            }

            return(sigPubKey.VerifyCompactJws(jwt));
        }
Example #2
0
        public string ToJson(RsaPublicKey sigPubKey)
        {
            if (Util.IsCompactJwe(Jwt))
            {
                return(Util.Jsonize(CONTENT_IS_ENCRYPTED));
            }
            if (Util.IsCompactJws(Jwt))
            {
                return(sigPubKey.VerifyCompactJws(Jwt));
            }

            throw new GoodIdException("Unsupported JWT format.");
        }