cauthy-auth 0.38.1 → 0.38.2
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/{cauthy-C-GoRXy9.d.mts → cauthy-3h6d8YXl.d.mts} +1 -1
- package/dist/{cauthy-BUozWD72.d.ts → cauthy-C-_Bj6-L.d.ts} +1 -1
- package/dist/cli.js +3 -2
- package/dist/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/express.d.mts +2 -2
- package/dist/express.d.ts +2 -2
- package/dist/fastify.d.mts +2 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/hono.d.mts +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/next.d.mts +2 -2
- package/dist/next.d.ts +2 -2
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/{system-DUGV040y.d.mts → system-CqPa5xR5.d.mts} +6 -0
- package/dist/{system-Bz4haPrI.d.ts → system-Dssq1JUJ.d.ts} +6 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -715,9 +715,10 @@ function createSystem(given = {}) {
|
|
|
715
715
|
let asking;
|
|
716
716
|
async function ask() {
|
|
717
717
|
configured();
|
|
718
|
-
const
|
|
718
|
+
const self = key?.clientId || clientId;
|
|
719
|
+
const form = new URLSearchParams({ grant_type: "client_credentials", client_id: self });
|
|
719
720
|
if (key) {
|
|
720
|
-
const assertion = await new SignJWT({}).setProtectedHeader({ alg: "RS256", kid: key.keyId }).setIssuer(
|
|
721
|
+
const assertion = await new SignJWT({}).setProtectedHeader({ alg: "RS256", kid: key.keyId }).setIssuer(self).setSubject(self).setAudience(tokenEndpoint).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("2m").sign(await signingKey());
|
|
721
722
|
form.set("client_assertion_type", ASSERTION_TYPE);
|
|
722
723
|
form.set("client_assertion", assertion);
|
|
723
724
|
} else {
|