@absolutejs/auth 0.56.10 → 0.56.11
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.js +3 -2
- package/dist/index.js.map +3 -3
- package/dist/server.js +3 -2
- package/dist/server.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30248,11 +30248,12 @@ var delegateAgentAuthorization = async (agentAuth, context, auditEmit) => {
|
|
|
30248
30248
|
now,
|
|
30249
30249
|
userId: context.userSub
|
|
30250
30250
|
});
|
|
30251
|
+
const grantedScopes2 = context.scopes.filter((scope) => registration2.allowedScopes.includes(scope) && agentAuth.scopes.includes(scope));
|
|
30251
30252
|
await agentAuth.delegationStore.saveDelegation({
|
|
30252
30253
|
agentId: registration2.agentId,
|
|
30253
30254
|
createdAt: existing?.createdAt ?? now,
|
|
30254
30255
|
delegationId: existing?.delegationId ?? `agd_${crypto.randomUUID()}`,
|
|
30255
|
-
scopes:
|
|
30256
|
+
scopes: [...new Set([...existing?.scopes ?? [], ...grantedScopes2])],
|
|
30256
30257
|
status: "active",
|
|
30257
30258
|
updatedAt: now,
|
|
30258
30259
|
userId: context.userSub
|
|
@@ -31056,5 +31057,5 @@ export {
|
|
|
31056
31057
|
AGENT_CLAIM_GRANT_TYPE
|
|
31057
31058
|
};
|
|
31058
31059
|
|
|
31059
|
-
//# debugId=
|
|
31060
|
+
//# debugId=CEE9F9BEA5B2A4F264756E2164756E21
|
|
31060
31061
|
//# sourceMappingURL=index.js.map
|