Hi Team , my usecase: by using wiremock standalone...
# help
y
Hi Team , my usecase: by using wiremock standalone jar, i have one htpps API call, once i call this i will get sync response and then after some time i need to get async notificaiton (which we can do ) but my question can we send notification to oaut2 api which is protected by ouauth2 can any suggestion will help a lot
l
Sending the notification should be no problem using the webhooks functionality but I don't think there is the ability to go through the oauth flow using a webhooks call. If I remember correctly, the oauth flow requires an exchange of tokens via a redirect url so the webhooks would know nothing about that part
y
got it and thanks Lee for the response.
@Lee Turner i am trying to
Copy code
implements WebhookTransformer
and with the help of this i am going to write customized logic for generating oatu2. if that possible can you please some examples on the same i tried to work but no luck, i tried to configure this and its calling target-host but its not hitting my code. any inputs will be helpfull
Copy code
{
  "request": {
    "urlPath": "/something-async",
    "method": "POST"
  },
  "response": {
    "status": 200
  },
  "serveEventListeners": [
    {
      "name": "webhook",
      "parameters": {
        "method": "POST",
        "url": "<http://my-target-host/callback>",
        "headers": {
          "Content-Type": "application/json"
        },
        "body": "{ \"result\": \"SUCCESS\" }"
      }
    }
  ]
}