@mastra/auth-studio 1.3.11-alpha.0 → 1.3.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/_types/@internal_auth/dist/_types/@internal_core/dist/base/index.d.ts +1 -3
- package/dist/_types/@internal_auth/dist/_types/@internal_core/dist/{index-Biaf3BmX.d.ts → index-TNVgGNjs.d.ts} +1 -5
- package/dist/index.cjs +7 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "fs";
|
|
2
2
|
import { join } from "path";
|
|
3
|
-
|
|
3
|
+
// ../../packages/_internals/auth/dist/types/index.js
|
|
4
4
|
function headerFromPlainObject(headers, name) {
|
|
5
5
|
const normalizedName = name.toLowerCase();
|
|
6
6
|
const matchingKey = Object.keys(headers).find((key) => key.toLowerCase() === normalizedName);
|
|
@@ -24,8 +24,7 @@ function getWebRequest(request) {
|
|
|
24
24
|
if (request instanceof Request) return request;
|
|
25
25
|
return request.raw instanceof Request ? request.raw : void 0;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region ../../packages/_internal-core/dist/logger/index.js
|
|
27
|
+
// ../../packages/_internal-core/dist/logger/index.js
|
|
29
28
|
/**
|
|
30
29
|
* Export a tracked exception through the adapter sink, mirroring the
|
|
31
30
|
* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`
|
|
@@ -258,8 +257,7 @@ var ConsoleLogger = class ConsoleLogger extends MastraLogger {
|
|
|
258
257
|
};
|
|
259
258
|
}
|
|
260
259
|
};
|
|
261
|
-
|
|
262
|
-
//#region ../../packages/_internal-core/dist/base/index.js
|
|
260
|
+
// ../../packages/_internal-core/dist/base/index.js
|
|
263
261
|
var MastraBase = class {
|
|
264
262
|
component = RegisteredLogger.LLM;
|
|
265
263
|
logger;
|
|
@@ -293,8 +291,7 @@ var MastraBase = class {
|
|
|
293
291
|
this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
|
|
294
292
|
}
|
|
295
293
|
};
|
|
296
|
-
|
|
297
|
-
//#region ../../packages/_internals/auth/dist/provider/index.js
|
|
294
|
+
// ../../packages/_internals/auth/dist/provider/index.js
|
|
298
295
|
var MastraAuthProvider = class extends MastraBase {
|
|
299
296
|
protected;
|
|
300
297
|
public;
|
|
@@ -306,7 +303,7 @@ var MastraAuthProvider = class extends MastraBase {
|
|
|
306
303
|
if (options?.authorizeUser) this.authorizeUser = options.authorizeUser.bind(this);
|
|
307
304
|
this.protected = options?.protected;
|
|
308
305
|
this.public = options?.public;
|
|
309
|
-
this.mapUserToResourceId = options
|
|
306
|
+
if (options?.mapUserToResourceId) this.mapUserToResourceId = options.mapUserToResourceId;
|
|
310
307
|
}
|
|
311
308
|
registerOptions(opts) {
|
|
312
309
|
if (opts?.authorizeUser) this.authorizeUser = opts.authorizeUser.bind(this);
|
|
@@ -315,8 +312,7 @@ var MastraAuthProvider = class extends MastraBase {
|
|
|
315
312
|
if (opts?.public) this.public = opts.public;
|
|
316
313
|
}
|
|
317
314
|
};
|
|
318
|
-
|
|
319
|
-
//#region ../../packages/_internals/auth/dist/ee-XRuijAiF.js
|
|
315
|
+
// ../../packages/_internals/auth/dist/ee-CAe-UJ9n.js
|
|
320
316
|
/**
|
|
321
317
|
* FGA enforcement utility for checking fine-grained authorization.
|
|
322
318
|
*
|
|
@@ -425,8 +421,7 @@ function resolvePermissionsFromMapping(roles, mapping) {
|
|
|
425
421
|
* @license Mastra Enterprise License - see ee/LICENSE
|
|
426
422
|
* @packageDocumentation
|
|
427
423
|
*/
|
|
428
|
-
|
|
429
|
-
//#region src/index.ts
|
|
424
|
+
// src/index.ts
|
|
430
425
|
const DEFAULT_SESSION_MAX_AGE_SECONDS = 1209600;
|
|
431
426
|
/**
|
|
432
427
|
* Name of the sealed session cookie on the shared API. Used for server-to-server
|
|
@@ -1189,7 +1184,6 @@ var MastraRBACStudio = class {
|
|
|
1189
1184
|
return permissions.some((required) => userPermissions.some((p) => matchesPermission(p, required)));
|
|
1190
1185
|
}
|
|
1191
1186
|
};
|
|
1192
|
-
//#endregion
|
|
1193
1187
|
export { HOST_SESSION_COOKIE_NAME, LEGACY_SESSION_COOKIE_NAME, MastraAuthStudio, MastraRBACStudio };
|
|
1194
1188
|
|
|
1195
1189
|
//# sourceMappingURL=index.js.map
|