cauthy-auth 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1013,10 +1013,15 @@ function createCauthy(given = {}) {
1013
1013
  accept: "application/json",
1014
1014
  // A link Cauthy mails opens the application's page for it when it
1015
1015
  // has one; otherwise Cauthy's own. Either way in the reader's language.
1016
- ...page ? { "x-cauthy-link-to": `${originOf(request)}${page}`, "x-cauthy-client-id": clientId } : { "x-cauthy-links": "hosted" },
1016
+ ...page ? { "x-cauthy-link-to": `${originOf(request)}${page}` } : { "x-cauthy-links": "hosted" },
1017
+ // Whose request it is: what Cauthy mails goes in this application's
1018
+ // name, under its logo.
1019
+ ...clientId ? { "x-cauthy-client-id": clientId } : {},
1017
1020
  ...await passedOn(request),
1018
1021
  ...bearer2 ? { authorization: `Bearer ${bearer2}` } : {},
1019
1022
  ...request.headers.get("accept-language") ? { "accept-language": request.headers.get("accept-language") } : {},
1023
+ // The language the application says its person reads, over the browser's.
1024
+ ...request.headers.get("x-cauthy-locale") ? { "x-cauthy-locale": request.headers.get("x-cauthy-locale") } : {},
1020
1025
  ...request.headers.get("user-agent") ? { "user-agent": request.headers.get("user-agent") } : {},
1021
1026
  ...payload === void 0 ? {} : { "content-type": "application/json" }
1022
1027
  },