public async Task <string> ToJsonAsync(RsaPublicKey sigPubKey) { var jwt = await RetrieveUriContentsAsync(RequestUri); if (Util.IsCompactJwe(jwt)) { return(CONTENT_IS_ENCRYPTED); } return(sigPubKey.VerifyCompactJws(jwt)); }
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."); }