0

I am new to writing webhooks so my question may have an obvious answer but I have no idea where to begin. I am writing a webhook for Janrain (IdP) and they return payload that looks like this (encoded JWT)

eyJ0eXAiOiJzZWNldmVudCtqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFkYzEyMDczNjk5YzY4YzFkYWVlNmM5Y
TEwMGUyYjQzZmViZGNkOTIifQ.eyJpc3MiOiJBa2FtYWkgSWRlbnRpdHkgQ2xvdWQiLCJpYXQiOjE1NjM0ODg2MzE
sImp0aSI6ImI3MDA0NmJkLTQ0YzctNDU3NS1iMWEyLTliODU1NmQxZjA0MCIsImF1ZCI6Imh0dHBzOi8vZXhhbXBs
ZS5jb20vcGF0aC90by9lbmRwb2ludCIsInR4biI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwM
CIsInRvZSI6MTU1OTM3MjQwMCwiZXZlbnRzIjp7InVzZXJDcmVkZW50aWFsVXBkYXRlZCI6eyJjYXB0dXJlQXBwbG
ljYXRpb25JZCI6Inp6eW45Z3k5cjh4ZHk1emtydTR5NTRzeWs2IiwiY2FwdHVyZUNsaWVudElkIjoiZWxycm5pdXg
1MWEzbnJoZnd6a2x2ejN0NDZsYjVuMm0iLCJlbnRpdHlUeXBlIjoidXNlciIsImdsb2JhbFN1YiI6ImNhcHR1cmUt
djE6Ly91cy5qYW5yYWluY2FwdHVyZS5jb20venp5bjlneTlyOHhkeTV6a3J1NHk1NHN5azYvdXNlci82YjAwNGJjN
S0xNzljLTQ1YzItODE1ZC0zMWIwNjE2OTM3MWQiLCJzdWIiOiI2YjAwNGJjNS0xNzljLTQ1YzItODE1ZC0zMWIwNj
E2OTM3MWQiLCJjcmVkZW50aWFsVHlwZSI6InBhc3N3b3JkIiwiaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0
wMDAwMDAwMDAwMDAifX19.IvkrGFE3GsK3eTLO_QvdFKqg4ktJ2sDToHNghMfGUlWNzRLMIpmgsWZXzLv0QMiyatL
va7mEshTlfyOje-S_Y-nUniM9hgHgNg-R0Az9hs2mu_ORcXEFo9AHayhjvW1bKHcmTI7dlw2fqFl-2VBS594LQspD
YfZ4WJ7hexq7OwACB8qp0oVskx_fc8mHQfy4YnW5GF4XlTcl6CnjYU81qY4hejcnkkg8olbq_ePUnpTpW8-YO5cPW
9nW8KlivRJGWJbEXnffSAd5xwlViJm6iTde2QQVv9pi_Z6LnrxPQotoGhJOvk_wkwANsWC9TwDNnlBTiLePCFLU85
haWanXcg

I tried looking for any possible documentation that tells me how to handle this data but I haven't figured what the custom webhook handler should look like. I referred to this https://www.mindovermachines.com/custom-webhooks-in-net-with-emma-api-easily-test-with-postman/ and was able to post a JSON request (obviously not thing something I am getting back) using Generic Json Receiver. What kind of receiver would I have to write to process this? Any pointers to get started would be helpful..

TIA

Subrato M
  • 159
  • 1
  • 12
  • Q: What exactly do you mean by a [Webhook](https://zapier.com/blog/what-are-webhooks/)? What specifically are you trying to accomplish? What specific technology are you using? For example, are you writing an Asp.Net Core 3.1 REST service in C#? Writing an Angular app that communicates with a 3rd party REST service? Something else entirely? Also: look [here](https://stackoverflow.com/a/55378222/421195) – paulsm4 Sep 19 '20 at 02:25
  • It's pub/sub basically. Whenever any information changes on IdP end, we want to capture it and process it. I am using .NET framework 4.7.2 – Subrato M Sep 19 '20 at 02:45
  • OK: then you want to write a .Net listener for an Akamai webhook. Please bear in mind that, per the [link](https://stackoverflow.com/a/55378222/421195) I mentioned above,`There's nothing magical about a "webhook".... is merely some endpoint set up on the "client", which in this case is actually a web server... just an action on a controller, tied to a particular route, for instance.` You've experimented with PostMan. I'd suggest the next step might be to experiment with a .Net WebAPI controller, talking to this API: https://identitydocs.akamai.com/home/webhooks-v3-e8e80de – paulsm4 Sep 19 '20 at 03:57

0 Answers0