@frontmcp/auth 1.9.3 → 1.9.5
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/README.md +11 -11
- package/authorities/authorities.errors.d.ts +5 -0
- package/authorities/authorities.errors.d.ts.map +1 -1
- package/esm/index.mjs +10 -1
- package/esm/package.json +6 -6
- package/index.js +10 -1
- package/package.json +6 -6
- package/session/secure-store.factory.d.ts +2 -0
- package/session/secure-store.factory.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -72,14 +72,14 @@ Apache-2.0 — see [LICENSE](../../LICENSE).
|
|
|
72
72
|
|
|
73
73
|
<!-- links -->
|
|
74
74
|
|
|
75
|
-
[docs-overview]: https://
|
|
76
|
-
[docs-remote]: https://
|
|
77
|
-
[docs-local]: https://
|
|
78
|
-
[docs-jwks]: https://
|
|
79
|
-
[docs-stores]: https://
|
|
80
|
-
[docs-vault]: https://
|
|
81
|
-
[docs-pkce]: https://
|
|
82
|
-
[docs-cimd]: https://
|
|
83
|
-
[docs-ui]: https://
|
|
84
|
-
[docs-audience]: https://
|
|
85
|
-
[docs-token-vault]: https://
|
|
75
|
+
[docs-overview]: https://frontmcp.dev/reference/auth
|
|
76
|
+
[docs-remote]: https://frontmcp.dev/reference/auth/remote
|
|
77
|
+
[docs-local]: https://frontmcp.dev/reference/auth/local
|
|
78
|
+
[docs-jwks]: https://frontmcp.dev/reference/auth/local
|
|
79
|
+
[docs-stores]: https://frontmcp.dev/reference/auth/production
|
|
80
|
+
[docs-vault]: https://frontmcp.dev/reference/auth/authorities
|
|
81
|
+
[docs-pkce]: https://frontmcp.dev/reference/auth/local
|
|
82
|
+
[docs-cimd]: https://frontmcp.dev/reference/auth/cimd
|
|
83
|
+
[docs-ui]: https://frontmcp.dev/reference/auth/login-ui
|
|
84
|
+
[docs-audience]: https://frontmcp.dev/reference/auth/tokens
|
|
85
|
+
[docs-token-vault]: https://frontmcp.dev/reference/auth/authorities
|
|
@@ -30,6 +30,11 @@ export interface AuthorityDeniedErrorParams {
|
|
|
30
30
|
* with code -32003 (FORBIDDEN).
|
|
31
31
|
*/
|
|
32
32
|
export declare class AuthorityDeniedError extends Error {
|
|
33
|
+
/**
|
|
34
|
+
* `instanceof AuthorityDeniedError` also recognises a denial from another copy of this package in the
|
|
35
|
+
* process, so every copy of `@frontmcp/sdk` answers it as a FORBIDDEN error (#802).
|
|
36
|
+
*/
|
|
37
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
33
38
|
/** MCP error code for JSON-RPC responses */
|
|
34
39
|
readonly mcpErrorCode = -32003;
|
|
35
40
|
/** HTTP status code equivalent */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorities.errors.d.ts","sourceRoot":"","sources":["../../src/authorities/authorities.errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"authorities.errors.d.ts","sourceRoot":"","sources":["../../src/authorities/authorities.errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQ7D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C;;;OAGG;WACa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAI7D,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,UAAkB;IACvC,kCAAkC;IAClC,QAAQ,CAAC,UAAU,OAAO;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,IAAI,sBAAsB;IACnC,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;gBAEvB,MAAM,EAAE,0BAA0B;IAW9C;;OAEG;IACH,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAcpF"}
|
package/esm/index.mjs
CHANGED
|
@@ -3660,7 +3660,7 @@ async function createSecureStore(options) {
|
|
|
3660
3660
|
pepper: readPepper(config) ?? pepper,
|
|
3661
3661
|
logger
|
|
3662
3662
|
});
|
|
3663
|
-
return { backend, scope, ttlMs, kind };
|
|
3663
|
+
return { backend, scope, ttlMs, kind, ...storage ? {} : { close: () => adapter.disconnect() } };
|
|
3664
3664
|
}
|
|
3665
3665
|
|
|
3666
3666
|
// libs/auth/src/session/token.vault.ts
|
|
@@ -11664,8 +11664,16 @@ var AuthoritiesEvaluatorRegistry = class {
|
|
|
11664
11664
|
};
|
|
11665
11665
|
|
|
11666
11666
|
// libs/auth/src/authorities/authorities.errors.ts
|
|
11667
|
+
import { brandClass, isBrandedInstance } from "@frontmcp/utils";
|
|
11667
11668
|
var FORBIDDEN_CODE = -32003;
|
|
11668
11669
|
var AuthorityDeniedError = class extends Error {
|
|
11670
|
+
/**
|
|
11671
|
+
* `instanceof AuthorityDeniedError` also recognises a denial from another copy of this package in the
|
|
11672
|
+
* process, so every copy of `@frontmcp/sdk` answers it as a FORBIDDEN error (#802).
|
|
11673
|
+
*/
|
|
11674
|
+
static [Symbol.hasInstance](value) {
|
|
11675
|
+
return isBrandedInstance(this, value);
|
|
11676
|
+
}
|
|
11669
11677
|
/** MCP error code for JSON-RPC responses */
|
|
11670
11678
|
mcpErrorCode = FORBIDDEN_CODE;
|
|
11671
11679
|
/** HTTP status code equivalent */
|
|
@@ -11710,6 +11718,7 @@ var AuthorityDeniedError = class extends Error {
|
|
|
11710
11718
|
};
|
|
11711
11719
|
}
|
|
11712
11720
|
};
|
|
11721
|
+
brandClass(AuthorityDeniedError, "@frontmcp/auth:AuthorityDeniedError");
|
|
11713
11722
|
|
|
11714
11723
|
// libs/auth/src/fetch/fetch-credential-middleware.ts
|
|
11715
11724
|
var bearerApplier = {
|
package/esm/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/auth",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "FrontMCP Auth - Authentication, session management, and credential vault",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://frontmcp.dev/reference/auth",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"mcp",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"node": ">=24.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@frontmcp/lazy-zod": "1.9.
|
|
51
|
-
"@frontmcp/storage-sqlite": "1.9.
|
|
50
|
+
"@frontmcp/lazy-zod": "1.9.5",
|
|
51
|
+
"@frontmcp/storage-sqlite": "1.9.5",
|
|
52
52
|
"@vercel/kv": "^3.0.0",
|
|
53
53
|
"ioredis": "^5.0.0"
|
|
54
54
|
},
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@frontmcp/di": "1.9.
|
|
68
|
-
"@frontmcp/utils": "1.9.
|
|
67
|
+
"@frontmcp/di": "1.9.5",
|
|
68
|
+
"@frontmcp/utils": "1.9.5",
|
|
69
69
|
"jose": "^6.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
package/index.js
CHANGED
|
@@ -3983,7 +3983,7 @@ async function createSecureStore(options) {
|
|
|
3983
3983
|
pepper: readPepper(config) ?? pepper,
|
|
3984
3984
|
logger
|
|
3985
3985
|
});
|
|
3986
|
-
return { backend, scope, ttlMs, kind };
|
|
3986
|
+
return { backend, scope, ttlMs, kind, ...storage ? {} : { close: () => adapter.disconnect() } };
|
|
3987
3987
|
}
|
|
3988
3988
|
|
|
3989
3989
|
// libs/auth/src/session/token.vault.ts
|
|
@@ -11974,8 +11974,16 @@ var AuthoritiesEvaluatorRegistry = class {
|
|
|
11974
11974
|
};
|
|
11975
11975
|
|
|
11976
11976
|
// libs/auth/src/authorities/authorities.errors.ts
|
|
11977
|
+
var import_utils50 = require("@frontmcp/utils");
|
|
11977
11978
|
var FORBIDDEN_CODE = -32003;
|
|
11978
11979
|
var AuthorityDeniedError = class extends Error {
|
|
11980
|
+
/**
|
|
11981
|
+
* `instanceof AuthorityDeniedError` also recognises a denial from another copy of this package in the
|
|
11982
|
+
* process, so every copy of `@frontmcp/sdk` answers it as a FORBIDDEN error (#802).
|
|
11983
|
+
*/
|
|
11984
|
+
static [Symbol.hasInstance](value) {
|
|
11985
|
+
return (0, import_utils50.isBrandedInstance)(this, value);
|
|
11986
|
+
}
|
|
11979
11987
|
/** MCP error code for JSON-RPC responses */
|
|
11980
11988
|
mcpErrorCode = FORBIDDEN_CODE;
|
|
11981
11989
|
/** HTTP status code equivalent */
|
|
@@ -12020,6 +12028,7 @@ var AuthorityDeniedError = class extends Error {
|
|
|
12020
12028
|
};
|
|
12021
12029
|
}
|
|
12022
12030
|
};
|
|
12031
|
+
(0, import_utils50.brandClass)(AuthorityDeniedError, "@frontmcp/auth:AuthorityDeniedError");
|
|
12023
12032
|
|
|
12024
12033
|
// libs/auth/src/fetch/fetch-credential-middleware.ts
|
|
12025
12034
|
var bearerApplier = {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/auth",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "FrontMCP Auth - Authentication, session management, and credential vault",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://frontmcp.dev/reference/auth",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"mcp",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"node": ">=24.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@frontmcp/lazy-zod": "1.9.
|
|
51
|
-
"@frontmcp/storage-sqlite": "1.9.
|
|
50
|
+
"@frontmcp/lazy-zod": "1.9.5",
|
|
51
|
+
"@frontmcp/storage-sqlite": "1.9.5",
|
|
52
52
|
"@vercel/kv": "^3.0.0",
|
|
53
53
|
"ioredis": "^5.0.0"
|
|
54
54
|
},
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@frontmcp/di": "1.9.
|
|
68
|
-
"@frontmcp/utils": "1.9.
|
|
67
|
+
"@frontmcp/di": "1.9.5",
|
|
68
|
+
"@frontmcp/utils": "1.9.5",
|
|
69
69
|
"jose": "^6.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
@@ -31,6 +31,8 @@ export interface ResolvedSecureStore {
|
|
|
31
31
|
scope: SecureStoreScope;
|
|
32
32
|
ttlMs?: number;
|
|
33
33
|
kind: SecureStoreBackendKind;
|
|
34
|
+
/** Closes the storage the factory opened for the backing; absent for a custom backend or a passed `storage`. */
|
|
35
|
+
close?: () => Promise<void>;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* Options for {@link createSecureStore}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-store.factory.d.ts","sourceRoot":"","sources":["../../src/session/secure-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,KAAK,iBAAiB,EAA0D,MAAM,uBAAuB,CAAC;AACvH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKhF,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"secure-store.factory.d.ts","sourceRoot":"","sources":["../../src/session/secure-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,KAAK,iBAAiB,EAA0D,MAAM,uBAAuB,CAAC;AACvH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKhF,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,sBAAsB,CAAC;IAC7B,gHAAgH;IAChH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,sEAAsE;IACtE,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,qBAAqB;IACrB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AA8DD;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA8BvG"}
|