integreat-io / integreat

Node.js integration layer
Other
14 stars 3 forks source link

Support endpoint specific authentication #246

Closed kjellmorten closed 11 months ago

kjellmorten commented 1 year ago

Integreat will authenticate both outgoing and incoming actions based on the auth settings of a service. However, there will be cases where not every endpoint on a service will require have the same authentication, e.g. when we have incoming endpoints that don't require authentication, together with endpoints that do.

This is easy to do in a backward-compatible fashion, as the usual behaviour with service authentication continues to work as before, and only when an auth prop is set on an endpoint will the new behaviour kick in. The biggest change here, though, is that we need to pick an endpoint before we can authenticate. This also allows response mutations to be run when authentication fails.