private static void RespondWithJwks(IHttpContext context) { List <X509Certificate2> signCerts = new List <X509Certificate2>() { new X509Certificate2("server.pfx", "", X509KeyStorageFlags.Exportable), new X509Certificate2("server2.pfx", "", X509KeyStorageFlags.Exportable) }; List <X509Certificate2> encCerts = new List <X509Certificate2>() { new X509Certificate2("server.pfx", "", X509KeyStorageFlags.Exportable), new X509Certificate2("server2.pfx", "", X509KeyStorageFlags.Exportable) }; Dictionary <string, object> keysDict = KeyManager.GetKeysJwkDict(signCerts, encCerts); string rstring = Serializer.SerializeToJson(keysDict); HttpWorker.WriteTextToResponse(context, rstring); }
private static void RequestUriCallback(IHttpContext context) { HttpWorker.WriteTextToResponse(context, request); }