I am trying to handle a webhook which comes from Microsoft teams. Along with the callback Microsoft teams sends us a JWT Bearer token in the headers.
The request is not reaching my code as the frappe is throwing an authentication error. I tried to hit the end point with headers passed. I got below response.
{
“exception”: “frappe.exceptions.AuthenticationError”,
“exc”: “["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 86, in application\n frappe.api.validate_auth()\n File \"apps/frappe/frappe/api.py\", line 186, in validate_auth\n raise frappe.AuthenticationError\nfrappe.exceptions.AuthenticationError\n"]”
}
How to overcome this error? I don’t want the authentication to be done even if the authorization headers are found.
I think there is a confusion. My issue is not about verification key. The verification key is a part of authorization headers. But frappe considers this bearer token as a token that is assigned to a signed in user.
Thanks for the suggestion. Monkey patching works in our case. But we didn’t want to consider monkey patching because we are not sure about what issues might come up and we didn’t want to mess up the authentication flow. Is it safe to follow this approach?