In my API I am trying to use Notification pattern for sending back the status of order. Scenario is like, When a Client create a order request, We receive the request and create a order id and return the order id to the client. Then Client Must Register a Listener using POST /api/hub with following request
{
"callback":"https://clientEndpoint.com",
"query":"OrderID:12345"
}
Then in our API we will persist these details to DB and whenever a status change is there then we can retrieve the call back url info and send the notification to the client.
I am having following questions:
1)Is the above mentioned one is correct use case of Notification Pattern?
2)If client is having some security added to the endpoint like basic authentication or Outh2.0(Client credentials) then how we should get those details?
Can we use query fields to get the authentication types and password? like
{"callback":"https://clientEndpoint.com","query":"OrderID:12345,basicauth:12233442, clientcredentials : somekey"}
Regards,
Ishaque------------------------------
MOHD Ishaque
Infosys Ltd.
------------------------------