@frontmcp/auth 1.0.4 → 1.1.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/authorities/authorities.context.d.ts +63 -0
- package/authorities/authorities.context.d.ts.map +1 -0
- package/authorities/authorities.engine.d.ts +65 -0
- package/authorities/authorities.engine.d.ts.map +1 -0
- package/authorities/authorities.errors.d.ts +59 -0
- package/authorities/authorities.errors.d.ts.map +1 -0
- package/authorities/authorities.evaluator.d.ts +28 -0
- package/authorities/authorities.evaluator.d.ts.map +1 -0
- package/authorities/authorities.metadata-augment.d.ts +31 -0
- package/authorities/authorities.metadata-augment.d.ts.map +1 -0
- package/authorities/authorities.profiles.d.ts +75 -0
- package/authorities/authorities.profiles.d.ts.map +1 -0
- package/authorities/authorities.registry.d.ts +86 -0
- package/authorities/authorities.registry.d.ts.map +1 -0
- package/authorities/authorities.schema.d.ts +24 -0
- package/authorities/authorities.schema.d.ts.map +1 -0
- package/authorities/authorities.scope-mapping.d.ts +16 -0
- package/authorities/authorities.scope-mapping.d.ts.map +1 -0
- package/authorities/authorities.types.d.ts +290 -0
- package/authorities/authorities.types.d.ts.map +1 -0
- package/authorities/index.d.ts +17 -0
- package/authorities/index.d.ts.map +1 -0
- package/authorization/authorization.class.d.ts +2 -3
- package/authorization/authorization.class.d.ts.map +1 -1
- package/authorization/authorization.types.d.ts +53 -54
- package/authorization/authorization.types.d.ts.map +1 -1
- package/authorization/index.d.ts +1 -1
- package/authorization/index.d.ts.map +1 -1
- package/cimd/cimd.types.d.ts +90 -90
- package/cimd/cimd.types.d.ts.map +1 -1
- package/common/jwt.types.d.ts +16 -16
- package/common/jwt.types.d.ts.map +1 -1
- package/common/session.types.d.ts +75 -76
- package/common/session.types.d.ts.map +1 -1
- package/common/zod-utils.d.ts +1 -1
- package/common/zod-utils.d.ts.map +1 -1
- package/consent/consent.types.d.ts +69 -69
- package/consent/consent.types.d.ts.map +1 -1
- package/context/frontmcp-auth-context.d.ts +113 -0
- package/context/frontmcp-auth-context.d.ts.map +1 -0
- package/context/frontmcp-auth-context.factory.d.ts +39 -0
- package/context/frontmcp-auth-context.factory.d.ts.map +1 -0
- package/context/frontmcp-auth-context.impl.d.ts +72 -0
- package/context/frontmcp-auth-context.impl.d.ts.map +1 -0
- package/context/index.d.ts +16 -0
- package/context/index.d.ts.map +1 -0
- package/detection/auth-provider-detection.d.ts +25 -25
- package/detection/auth-provider-detection.d.ts.map +1 -1
- package/esm/index.mjs +1036 -120
- package/esm/package.json +5 -5
- package/fetch/fetch-credential-middleware.d.ts +99 -0
- package/fetch/fetch-credential-middleware.d.ts.map +1 -0
- package/fetch/index.d.ts +10 -0
- package/fetch/index.d.ts.map +1 -0
- package/index.d.ts +6 -2
- package/index.d.ts.map +1 -1
- package/index.js +1619 -680
- package/machine-id/index.d.ts +1 -1
- package/machine-id/index.d.ts.map +1 -1
- package/options/app-auth.schema.d.ts +235 -235
- package/options/app-auth.schema.d.ts.map +1 -1
- package/options/orchestrated.schema.d.ts +371 -371
- package/options/orchestrated.schema.d.ts.map +1 -1
- package/options/public.schema.d.ts +16 -16
- package/options/public.schema.d.ts.map +1 -1
- package/options/schema.d.ts +227 -227
- package/options/schema.d.ts.map +1 -1
- package/options/shared.schemas.d.ts +97 -97
- package/options/shared.schemas.d.ts.map +1 -1
- package/options/transparent.schema.d.ts +30 -30
- package/options/transparent.schema.d.ts.map +1 -1
- package/options/typecheck.d.ts.map +1 -1
- package/package.json +5 -5
- package/session/authorization-vault.d.ts +380 -380
- package/session/authorization-vault.d.ts.map +1 -1
- package/session/authorization.store.d.ts +28 -29
- package/session/authorization.store.d.ts.map +1 -1
- package/session/encrypted-authorization-vault.d.ts +21 -21
- package/session/encrypted-authorization-vault.d.ts.map +1 -1
- package/session/transport-session.types.d.ts +166 -167
- package/session/transport-session.types.d.ts.map +1 -1
- package/session/vault-encryption.d.ts +27 -27
- package/session/vault-encryption.d.ts.map +1 -1
- package/vault/auth-providers.types.d.ts +45 -46
- package/vault/auth-providers.types.d.ts.map +1 -1
|
@@ -4,103 +4,103 @@
|
|
|
4
4
|
* Defines types for the tool consent flow that allows users to select
|
|
5
5
|
* which MCP tools they want to expose to the LLM.
|
|
6
6
|
*/
|
|
7
|
-
import { z } from 'zod';
|
|
7
|
+
import { z } from '@frontmcp/lazy-zod';
|
|
8
8
|
import { consentConfigSchema } from '../options/shared.schemas';
|
|
9
9
|
export { consentConfigSchema };
|
|
10
10
|
/**
|
|
11
11
|
* Tool consent item schema - represents a tool available for consent
|
|
12
12
|
*/
|
|
13
|
-
export declare const consentToolItemSchema:
|
|
14
|
-
id:
|
|
15
|
-
name:
|
|
16
|
-
description:
|
|
17
|
-
appId:
|
|
18
|
-
appName:
|
|
19
|
-
defaultSelected:
|
|
20
|
-
requiredScopes:
|
|
21
|
-
category:
|
|
22
|
-
},
|
|
13
|
+
export declare const consentToolItemSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
14
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
15
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
16
|
+
description: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
17
|
+
appId: import("@frontmcp/lazy-zod").ZodString;
|
|
18
|
+
appName: import("@frontmcp/lazy-zod").ZodString;
|
|
19
|
+
defaultSelected: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
20
|
+
requiredScopes: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
21
|
+
category: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
22
|
+
}, import("zod/v4/core").$strip>;
|
|
23
23
|
/**
|
|
24
24
|
* Consent selection schema - user's tool selection
|
|
25
25
|
*/
|
|
26
|
-
export declare const consentSelectionSchema:
|
|
27
|
-
selectedTools:
|
|
28
|
-
allSelected:
|
|
29
|
-
consentedAt:
|
|
30
|
-
consentVersion:
|
|
31
|
-
},
|
|
26
|
+
export declare const consentSelectionSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
27
|
+
selectedTools: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
28
|
+
allSelected: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
29
|
+
consentedAt: import("@frontmcp/lazy-zod").ZodString;
|
|
30
|
+
consentVersion: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodString>;
|
|
31
|
+
}, import("zod/v4/core").$strip>;
|
|
32
32
|
/**
|
|
33
33
|
* Consent page state schema - stored in pending authorization
|
|
34
34
|
*/
|
|
35
|
-
export declare const consentStateSchema:
|
|
36
|
-
enabled:
|
|
37
|
-
availableTools:
|
|
38
|
-
id:
|
|
39
|
-
name:
|
|
40
|
-
description:
|
|
41
|
-
appId:
|
|
42
|
-
appName:
|
|
43
|
-
defaultSelected:
|
|
44
|
-
requiredScopes:
|
|
45
|
-
category:
|
|
46
|
-
},
|
|
47
|
-
preselectedTools:
|
|
48
|
-
groupByApp:
|
|
49
|
-
customMessage:
|
|
50
|
-
},
|
|
35
|
+
export declare const consentStateSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
36
|
+
enabled: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
37
|
+
availableTools: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
38
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
39
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
40
|
+
description: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
41
|
+
appId: import("@frontmcp/lazy-zod").ZodString;
|
|
42
|
+
appName: import("@frontmcp/lazy-zod").ZodString;
|
|
43
|
+
defaultSelected: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
44
|
+
requiredScopes: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
45
|
+
category: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
46
|
+
}, import("zod/v4/core").$strip>>;
|
|
47
|
+
preselectedTools: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
48
|
+
groupByApp: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
49
|
+
customMessage: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
50
|
+
}, import("zod/v4/core").$strip>;
|
|
51
51
|
/**
|
|
52
52
|
* Auth provider item for federated login UI
|
|
53
53
|
*/
|
|
54
|
-
export declare const federatedProviderItemSchema:
|
|
55
|
-
id:
|
|
56
|
-
name:
|
|
57
|
-
description:
|
|
58
|
-
icon:
|
|
59
|
-
type:
|
|
54
|
+
export declare const federatedProviderItemSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
55
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
56
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
57
|
+
description: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
58
|
+
icon: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
59
|
+
type: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
60
60
|
transparent: "transparent";
|
|
61
61
|
local: "local";
|
|
62
62
|
remote: "remote";
|
|
63
63
|
}>;
|
|
64
|
-
providerUrl:
|
|
65
|
-
appIds:
|
|
66
|
-
appNames:
|
|
67
|
-
scopes:
|
|
68
|
-
isPrimary:
|
|
69
|
-
isOptional:
|
|
70
|
-
},
|
|
64
|
+
providerUrl: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
65
|
+
appIds: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
66
|
+
appNames: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
67
|
+
scopes: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
68
|
+
isPrimary: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
69
|
+
isOptional: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
70
|
+
}, import("zod/v4/core").$strip>;
|
|
71
71
|
/**
|
|
72
72
|
* Federated login state schema
|
|
73
73
|
*/
|
|
74
|
-
export declare const federatedLoginStateSchema:
|
|
75
|
-
providers:
|
|
76
|
-
id:
|
|
77
|
-
name:
|
|
78
|
-
description:
|
|
79
|
-
icon:
|
|
80
|
-
type:
|
|
74
|
+
export declare const federatedLoginStateSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
75
|
+
providers: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
|
|
76
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
77
|
+
name: import("@frontmcp/lazy-zod").ZodString;
|
|
78
|
+
description: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
79
|
+
icon: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
80
|
+
type: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
81
81
|
transparent: "transparent";
|
|
82
82
|
local: "local";
|
|
83
83
|
remote: "remote";
|
|
84
84
|
}>;
|
|
85
|
-
providerUrl:
|
|
86
|
-
appIds:
|
|
87
|
-
appNames:
|
|
88
|
-
scopes:
|
|
89
|
-
isPrimary:
|
|
90
|
-
isOptional:
|
|
91
|
-
},
|
|
92
|
-
primaryProviderId:
|
|
93
|
-
allowSkip:
|
|
94
|
-
preselectedProviders:
|
|
95
|
-
},
|
|
85
|
+
providerUrl: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
86
|
+
appIds: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
87
|
+
appNames: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
88
|
+
scopes: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
89
|
+
isPrimary: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
90
|
+
isOptional: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
91
|
+
}, import("zod/v4/core").$strip>>;
|
|
92
|
+
primaryProviderId: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
93
|
+
allowSkip: import("@frontmcp/lazy-zod").ZodDefault<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
94
|
+
preselectedProviders: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>>;
|
|
95
|
+
}, import("zod/v4/core").$strip>;
|
|
96
96
|
/**
|
|
97
97
|
* Federated login selection schema
|
|
98
98
|
*/
|
|
99
|
-
export declare const federatedSelectionSchema:
|
|
100
|
-
selectedProviders:
|
|
101
|
-
skippedProviders:
|
|
102
|
-
providerMetadata:
|
|
103
|
-
},
|
|
99
|
+
export declare const federatedSelectionSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
100
|
+
selectedProviders: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
101
|
+
skippedProviders: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
102
|
+
providerMetadata: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
103
|
+
}, import("zod/v4/core").$strip>;
|
|
104
104
|
export type ConsentToolItem = z.infer<typeof consentToolItemSchema>;
|
|
105
105
|
export type ConsentSelection = z.infer<typeof consentSelectionSchema>;
|
|
106
106
|
export type ConsentState = z.infer<typeof consentStateSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent.types.d.ts","sourceRoot":"","sources":["../../src/consent/consent.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"consent.types.d.ts","sourceRoot":"","sources":["../../src/consent/consent.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAM/B;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;gCAiBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;gCASjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;gCAW7B,CAAC;AAKH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;gCAuBtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;gCASpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;gCAOnC,CAAC;AAMH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FrontMcpAuthContext — FrontMCP's own auth identity interface.
|
|
3
|
+
*
|
|
4
|
+
* Extensible via `declare global { interface ExtendFrontMcpAuthContext { ... } }`.
|
|
5
|
+
* Custom fields are populated by auth context pipes registered in
|
|
6
|
+
* `@FrontMcp({ authorities: { pipes: [...] } })`.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Global extension interface for FrontMcpAuthContext.
|
|
10
|
+
* Developers augment this to add custom typed fields extracted from JWT claims.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* declare global {
|
|
15
|
+
* interface ExtendFrontMcpAuthContext {
|
|
16
|
+
* tenantId: string;
|
|
17
|
+
* orgName: string;
|
|
18
|
+
* subscription: { plan: string; active: boolean };
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare global {
|
|
24
|
+
interface ExtendFrontMcpAuthContext {
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Pipe function that extracts custom fields from JWT claims during context construction.
|
|
29
|
+
* Can be sync or async (for DB/Redis lookups).
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const extractTenant: AuthContextPipe = (claims) => ({
|
|
34
|
+
* tenantId: claims['tenantId'] as string ?? '',
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* const lookupSubscription: AuthContextPipe = async (claims) => {
|
|
38
|
+
* const plan = await db.query('SELECT plan FROM orgs WHERE id=$1', [claims['org_id']]);
|
|
39
|
+
* return { subscription: { plan: plan?.name ?? 'free', active: !!plan?.active } };
|
|
40
|
+
* };
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export type AuthContextPipe = (claims: Readonly<Record<string, unknown>>) => Partial<ExtendFrontMcpAuthContext> | Promise<Partial<ExtendFrontMcpAuthContext>>;
|
|
44
|
+
/**
|
|
45
|
+
* User identity attached to a FrontMcpAuthContext.
|
|
46
|
+
*/
|
|
47
|
+
export interface FrontMcpAuthUser {
|
|
48
|
+
/** Subject identifier (e.g., JWT `sub` claim) */
|
|
49
|
+
readonly sub: string;
|
|
50
|
+
/** Display name */
|
|
51
|
+
readonly name?: string;
|
|
52
|
+
/** Email address */
|
|
53
|
+
readonly email?: string;
|
|
54
|
+
/** Avatar URL */
|
|
55
|
+
readonly picture?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Rich authentication context for FrontMCP request processing.
|
|
59
|
+
*
|
|
60
|
+
* Built from raw auth info (e.g., AuthInfo from MCP SDK) plus an optional
|
|
61
|
+
* {@link AuthoritiesClaimsMapping} that tells the builder where to find
|
|
62
|
+
* roles and permissions in IdP-specific JWT shapes.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* if (ctx.isAnonymous) {
|
|
67
|
+
* throw new Error('Authentication required');
|
|
68
|
+
* }
|
|
69
|
+
* if (!ctx.hasRole('admin')) {
|
|
70
|
+
* throw new Error('Admin role required');
|
|
71
|
+
* }
|
|
72
|
+
* if (!ctx.hasAllScopes(['read', 'write'])) {
|
|
73
|
+
* throw new Error('Insufficient scopes');
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export interface FrontMcpAuthContext extends ExtendFrontMcpAuthContext {
|
|
78
|
+
/** Resolved user identity */
|
|
79
|
+
readonly user: FrontMcpAuthUser;
|
|
80
|
+
/** True when the user is anonymous (sub starts with `anon:` or is empty) */
|
|
81
|
+
readonly isAnonymous: boolean;
|
|
82
|
+
/** Authentication mode (e.g., 'public', 'transparent', 'orchestrated') */
|
|
83
|
+
readonly mode: string;
|
|
84
|
+
/** Session identifier (empty string if no session) */
|
|
85
|
+
readonly sessionId: string;
|
|
86
|
+
/** OAuth scopes granted to this session */
|
|
87
|
+
readonly scopes: readonly string[];
|
|
88
|
+
/** Raw JWT claims (merged from user + extra.authorization.claims) */
|
|
89
|
+
readonly claims: Readonly<Record<string, unknown>>;
|
|
90
|
+
/** Resolved roles (via claimsMapping or direct extraction) */
|
|
91
|
+
readonly roles: readonly string[];
|
|
92
|
+
/** Resolved permissions (via claimsMapping or direct extraction) */
|
|
93
|
+
readonly permissions: readonly string[];
|
|
94
|
+
/** Check whether the user has a specific role */
|
|
95
|
+
hasRole(role: string): boolean;
|
|
96
|
+
/** Check whether the user has ALL of the specified roles */
|
|
97
|
+
hasAllRoles(roles: readonly string[]): boolean;
|
|
98
|
+
/** Check whether the user has at least one of the specified roles */
|
|
99
|
+
hasAnyRole(roles: readonly string[]): boolean;
|
|
100
|
+
/** Check whether the user has a specific permission */
|
|
101
|
+
hasPermission(permission: string): boolean;
|
|
102
|
+
/** Check whether the user has ALL of the specified permissions */
|
|
103
|
+
hasAllPermissions(permissions: readonly string[]): boolean;
|
|
104
|
+
/** Check whether the user has at least one of the specified permissions */
|
|
105
|
+
hasAnyPermission(permissions: readonly string[]): boolean;
|
|
106
|
+
/** Check whether the session has a specific OAuth scope */
|
|
107
|
+
hasScope(scope: string): boolean;
|
|
108
|
+
/** Check whether the session has ALL of the specified OAuth scopes */
|
|
109
|
+
hasAllScopes(scopes: readonly string[]): boolean;
|
|
110
|
+
/** Check whether the session has at least one of the specified OAuth scopes */
|
|
111
|
+
hasAnyScope(scopes: readonly string[]): boolean;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=frontmcp-auth-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmcp-auth-context.d.ts","sourceRoot":"","sources":["../../src/context/frontmcp-auth-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,yBAAyB;KAAG;CACvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACtC,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAMtF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,mBAAmB;IACnB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB;IACjB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,mBAAoB,SAAQ,yBAAyB;IACpE,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAEhC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAEnC,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnD,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAElC,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC,iDAAiD;IACjD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAE/B,4DAA4D;IAC5D,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IAE/C,qEAAqE;IACrE,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IAE9C,uDAAuD;IACvD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAE3C,kEAAkE;IAClE,iBAAiB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3D,2EAA2E;IAC3E,gBAAgB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IAE1D,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAEjC,sEAAsE;IACtE,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IAEjD,+EAA+E;IAC/E,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;CACjD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory function for building FrontMcpAuthContext instances.
|
|
3
|
+
*
|
|
4
|
+
* This is the recommended entry point — prefer `buildAuthContext()` over
|
|
5
|
+
* directly constructing `FrontMcpAuthContextImpl`.
|
|
6
|
+
*/
|
|
7
|
+
import type { AuthoritiesClaimsMapping } from '../authorities/authorities.profiles';
|
|
8
|
+
import type { FrontMcpAuthContext, AuthContextPipe } from './frontmcp-auth-context';
|
|
9
|
+
import type { AuthContextSourceInfo } from './frontmcp-auth-context.impl';
|
|
10
|
+
/**
|
|
11
|
+
* Build a {@link FrontMcpAuthContext} from raw auth information.
|
|
12
|
+
*
|
|
13
|
+
* When `pipes` are provided, they run in sequence after the base context is built.
|
|
14
|
+
* Each pipe receives the merged JWT claims and returns custom fields that are
|
|
15
|
+
* merged into the final context. Pipes can be async (for DB/Redis lookups).
|
|
16
|
+
*
|
|
17
|
+
* @param authInfo - Raw auth info (e.g., from MCP SDK AuthInfo, JWT payload, etc.)
|
|
18
|
+
* @param claimsMapping - Optional IdP-specific claims mapping (Keycloak, Auth0, Okta, etc.)
|
|
19
|
+
* @param pipes - Optional pipe functions that extract custom fields from claims
|
|
20
|
+
* @returns A frozen, immutable FrontMcpAuthContext instance (with custom extensions if pipes provided)
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* // Without pipes
|
|
25
|
+
* const ctx = buildAuthContext({ user: { sub: 'user-123' } });
|
|
26
|
+
*
|
|
27
|
+
* // With pipes
|
|
28
|
+
* const ctx = await buildAuthContext(authInfo, claimsMapping, [
|
|
29
|
+
* (claims) => ({ tenantId: claims['tenantId'] as string }),
|
|
30
|
+
* async (claims) => {
|
|
31
|
+
* const plan = await db.query('SELECT plan FROM orgs WHERE id=$1', [claims['org_id']]);
|
|
32
|
+
* return { subscription: { plan: plan?.name ?? 'free', active: !!plan?.active } };
|
|
33
|
+
* },
|
|
34
|
+
* ]);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildAuthContext(authInfo: AuthContextSourceInfo, claimsMapping?: AuthoritiesClaimsMapping): FrontMcpAuthContext;
|
|
38
|
+
export declare function buildAuthContext(authInfo: AuthContextSourceInfo, claimsMapping: AuthoritiesClaimsMapping | undefined, pipes: AuthContextPipe[]): Promise<FrontMcpAuthContext>;
|
|
39
|
+
//# sourceMappingURL=frontmcp-auth-context.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmcp-auth-context.factory.d.ts","sourceRoot":"","sources":["../../src/context/frontmcp-auth-context.factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,CAAC,EAAE,wBAAwB,GACvC,mBAAmB,CAAC;AACvB,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,EAAE,wBAAwB,GAAG,SAAS,EACnD,KAAK,EAAE,eAAe,EAAE,GACvB,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FrontMcpAuthContextImpl — Concrete implementation of FrontMcpAuthContext.
|
|
3
|
+
*
|
|
4
|
+
* Takes raw auth info and an optional AuthoritiesClaimsMapping, resolves
|
|
5
|
+
* roles/permissions using the same `resolveDotPath` utility used by the
|
|
6
|
+
* authorities engine, and exposes convenience query methods.
|
|
7
|
+
*/
|
|
8
|
+
import type { AuthoritiesClaimsMapping } from '../authorities/authorities.profiles';
|
|
9
|
+
import type { FrontMcpAuthContext, FrontMcpAuthUser } from './frontmcp-auth-context';
|
|
10
|
+
/**
|
|
11
|
+
* Minimal shape of incoming auth info that FrontMcpAuthContextImpl accepts.
|
|
12
|
+
* Intentionally loose so it can accept both MCP SDK AuthInfo shapes and
|
|
13
|
+
* FrontMCP's own future FrontMcpAuthInfo.
|
|
14
|
+
*/
|
|
15
|
+
export interface AuthContextSourceInfo {
|
|
16
|
+
/** OAuth token (if present) */
|
|
17
|
+
token?: string;
|
|
18
|
+
/** Client ID */
|
|
19
|
+
clientId?: string;
|
|
20
|
+
/** OAuth scopes */
|
|
21
|
+
scopes?: string[];
|
|
22
|
+
/** Token expiry (epoch seconds) */
|
|
23
|
+
expiresAt?: number;
|
|
24
|
+
/** User object — shape varies by IdP */
|
|
25
|
+
user?: {
|
|
26
|
+
sub?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
picture?: string;
|
|
30
|
+
roles?: string[];
|
|
31
|
+
permissions?: string[];
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
/** Session ID (string or nested object with `id` field) */
|
|
35
|
+
sessionId?: string;
|
|
36
|
+
/** Extended claims / metadata */
|
|
37
|
+
extra?: Record<string, unknown>;
|
|
38
|
+
/** Allow additional top-level keys for forward-compat */
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Concrete implementation of {@link FrontMcpAuthContext}.
|
|
43
|
+
*
|
|
44
|
+
* Constructed via {@link buildAuthContext} factory — not intended for direct instantiation
|
|
45
|
+
* by application code (though it is exported for testing purposes).
|
|
46
|
+
*/
|
|
47
|
+
export declare class FrontMcpAuthContextImpl implements FrontMcpAuthContext {
|
|
48
|
+
readonly user: FrontMcpAuthUser;
|
|
49
|
+
readonly isAnonymous: boolean;
|
|
50
|
+
readonly mode: string;
|
|
51
|
+
readonly sessionId: string;
|
|
52
|
+
readonly scopes: readonly string[];
|
|
53
|
+
readonly claims: Readonly<Record<string, unknown>>;
|
|
54
|
+
readonly roles: readonly string[];
|
|
55
|
+
readonly permissions: readonly string[];
|
|
56
|
+
constructor(source: AuthContextSourceInfo, claimsMapping?: AuthoritiesClaimsMapping);
|
|
57
|
+
hasRole(role: string): boolean;
|
|
58
|
+
hasAllRoles(roles: readonly string[]): boolean;
|
|
59
|
+
hasAnyRole(roles: readonly string[]): boolean;
|
|
60
|
+
hasPermission(permission: string): boolean;
|
|
61
|
+
hasAllPermissions(permissions: readonly string[]): boolean;
|
|
62
|
+
hasAnyPermission(permissions: readonly string[]): boolean;
|
|
63
|
+
hasScope(scope: string): boolean;
|
|
64
|
+
hasAllScopes(scopes: readonly string[]): boolean;
|
|
65
|
+
hasAnyScope(scopes: readonly string[]): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Build the merged raw claims map from user fields + extra.authorization.claims.
|
|
68
|
+
* Mirrors the logic in AuthoritiesContextBuilder.build().
|
|
69
|
+
*/
|
|
70
|
+
private buildRawClaims;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=frontmcp-auth-context.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmcp-auth-context.impl.d.ts","sourceRoot":"","sources":["../../src/context/frontmcp-auth-context.impl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAErF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,yDAAyD;IACzD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAgBD;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,mBAAmB;IACjE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;gBAE5B,MAAM,EAAE,qBAAqB,EAAE,aAAa,CAAC,EAAE,wBAAwB;IA0DnF,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAI9C,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAI7C,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI1C,iBAAiB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAI1D,gBAAgB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAIzD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAIhD,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAM/C;;;OAGG;IACH,OAAO,CAAC,cAAc;CASvB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FrontMcpAuthContext module — FrontMCP's own auth identity type system.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { buildAuthContext } from '@frontmcp/auth';
|
|
7
|
+
*
|
|
8
|
+
* const ctx = buildAuthContext(authInfo, { roles: 'realm_access.roles' });
|
|
9
|
+
* if (ctx.hasRole('admin')) { ... }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export type { FrontMcpAuthContext, FrontMcpAuthUser, AuthContextPipe } from './frontmcp-auth-context';
|
|
13
|
+
export { FrontMcpAuthContextImpl } from './frontmcp-auth-context.impl';
|
|
14
|
+
export type { AuthContextSourceInfo } from './frontmcp-auth-context.impl';
|
|
15
|
+
export { buildAuthContext } from './frontmcp-auth-context.factory';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -4,42 +4,42 @@
|
|
|
4
4
|
* Detects unique auth providers across nested apps and determines
|
|
5
5
|
* if orchestrated mode is required at the parent scope level.
|
|
6
6
|
*/
|
|
7
|
-
import { z } from 'zod';
|
|
7
|
+
import { z } from '@frontmcp/lazy-zod';
|
|
8
8
|
import type { AuthOptions } from '../options/schema';
|
|
9
|
-
export declare const detectedAuthProviderSchema:
|
|
10
|
-
id:
|
|
11
|
-
providerUrl:
|
|
12
|
-
mode:
|
|
9
|
+
export declare const detectedAuthProviderSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
10
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
11
|
+
providerUrl: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
12
|
+
mode: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
13
13
|
public: "public";
|
|
14
14
|
transparent: "transparent";
|
|
15
15
|
local: "local";
|
|
16
16
|
remote: "remote";
|
|
17
17
|
}>;
|
|
18
|
-
appIds:
|
|
19
|
-
scopes:
|
|
20
|
-
isParentProvider:
|
|
21
|
-
},
|
|
22
|
-
export declare const authProviderDetectionResultSchema:
|
|
23
|
-
providers:
|
|
24
|
-
id:
|
|
25
|
-
providerUrl:
|
|
26
|
-
mode:
|
|
18
|
+
appIds: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
19
|
+
scopes: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
20
|
+
isParentProvider: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
21
|
+
}, import("zod/v4/core").$strip>;
|
|
22
|
+
export declare const authProviderDetectionResultSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
23
|
+
providers: import("zod").ZodMap<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodObject<{
|
|
24
|
+
id: import("@frontmcp/lazy-zod").ZodString;
|
|
25
|
+
providerUrl: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
26
|
+
mode: import("@frontmcp/lazy-zod").ZodEnum<{
|
|
27
27
|
public: "public";
|
|
28
28
|
transparent: "transparent";
|
|
29
29
|
local: "local";
|
|
30
30
|
remote: "remote";
|
|
31
31
|
}>;
|
|
32
|
-
appIds:
|
|
33
|
-
scopes:
|
|
34
|
-
isParentProvider:
|
|
35
|
-
},
|
|
36
|
-
requiresOrchestration:
|
|
37
|
-
parentProviderId:
|
|
38
|
-
childProviderIds:
|
|
39
|
-
uniqueProviderCount:
|
|
40
|
-
validationErrors:
|
|
41
|
-
warnings:
|
|
42
|
-
},
|
|
32
|
+
appIds: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
33
|
+
scopes: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
34
|
+
isParentProvider: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
35
|
+
}, import("zod/v4/core").$strip>>;
|
|
36
|
+
requiresOrchestration: import("@frontmcp/lazy-zod").ZodBoolean;
|
|
37
|
+
parentProviderId: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
|
|
38
|
+
childProviderIds: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
39
|
+
uniqueProviderCount: import("@frontmcp/lazy-zod").ZodNumber;
|
|
40
|
+
validationErrors: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
41
|
+
warnings: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodString>;
|
|
42
|
+
}, import("zod/v4/core").$strip>;
|
|
43
43
|
export type DetectedAuthProvider = z.infer<typeof detectedAuthProviderSchema>;
|
|
44
44
|
export type AuthProviderDetectionResult = z.infer<typeof authProviderDetectionResultSchema>;
|
|
45
45
|
export interface AppAuthInfo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-provider-detection.d.ts","sourceRoot":"","sources":["../../src/detection/auth-provider-detection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"auth-provider-detection.d.ts","sourceRoot":"","sources":["../../src/detection/auth-provider-detection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;gCAOrC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;gCAQ5C,CAAC;AAMH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAMD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAiB7D;AAyBD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,WAAW,GAAG,SAAS,EACnC,IAAI,EAAE,WAAW,EAAE,GAClB,2BAA2B,CA4E7B;AAcD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,UAAU,EAAE,WAAW,GAAG,SAAS,GAClC,OAAO,CAaT;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGtG;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpG"}
|