@kya-os/mcp-i-core 1.2.3-canary.7 → 1.3.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/.claude/settings.local.json +9 -0
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test$colon$coverage.log +4514 -0
- package/.turbo/turbo-test.log +2973 -0
- package/COMPLIANCE_IMPROVEMENT_REPORT.md +483 -0
- package/Composer 3.md +615 -0
- package/GPT-5.md +1169 -0
- package/OPUS-plan.md +352 -0
- package/PHASE_3_AND_4.1_SUMMARY.md +585 -0
- package/PHASE_3_SUMMARY.md +317 -0
- package/PHASE_4.1.3_SUMMARY.md +428 -0
- package/PHASE_4.1_COMPLETE.md +525 -0
- package/PHASE_4_USER_DID_IDENTITY_LINKING_PLAN.md +1240 -0
- package/SCHEMA_COMPLIANCE_REPORT.md +275 -0
- package/TEST_PLAN.md +571 -0
- package/coverage/coverage-final.json +57 -0
- package/dist/__tests__/utils/mock-providers.d.ts +1 -2
- package/dist/__tests__/utils/mock-providers.d.ts.map +1 -1
- package/dist/__tests__/utils/mock-providers.js.map +1 -1
- package/dist/cache/oauth-config-cache.d.ts +69 -0
- package/dist/cache/oauth-config-cache.d.ts.map +1 -0
- package/dist/cache/oauth-config-cache.js +76 -0
- package/dist/cache/oauth-config-cache.js.map +1 -0
- package/dist/identity/idp-token-resolver.d.ts +53 -0
- package/dist/identity/idp-token-resolver.d.ts.map +1 -0
- package/dist/identity/idp-token-resolver.js +108 -0
- package/dist/identity/idp-token-resolver.js.map +1 -0
- package/dist/identity/idp-token-storage.interface.d.ts +42 -0
- package/dist/identity/idp-token-storage.interface.d.ts.map +1 -0
- package/dist/identity/idp-token-storage.interface.js +12 -0
- package/dist/identity/idp-token-storage.interface.js.map +1 -0
- package/dist/identity/user-did-manager.d.ts +39 -1
- package/dist/identity/user-did-manager.d.ts.map +1 -1
- package/dist/identity/user-did-manager.js +69 -3
- package/dist/identity/user-did-manager.js.map +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/audit-logger.d.ts +37 -0
- package/dist/runtime/audit-logger.d.ts.map +1 -0
- package/dist/runtime/audit-logger.js +9 -0
- package/dist/runtime/audit-logger.js.map +1 -0
- package/dist/runtime/base.d.ts +58 -2
- package/dist/runtime/base.d.ts.map +1 -1
- package/dist/runtime/base.js +266 -11
- package/dist/runtime/base.js.map +1 -1
- package/dist/services/access-control.service.d.ts.map +1 -1
- package/dist/services/access-control.service.js +200 -35
- package/dist/services/access-control.service.js.map +1 -1
- package/dist/services/authorization/authorization-registry.d.ts +29 -0
- package/dist/services/authorization/authorization-registry.d.ts.map +1 -0
- package/dist/services/authorization/authorization-registry.js +57 -0
- package/dist/services/authorization/authorization-registry.js.map +1 -0
- package/dist/services/authorization/types.d.ts +53 -0
- package/dist/services/authorization/types.d.ts.map +1 -0
- package/dist/services/authorization/types.js +10 -0
- package/dist/services/authorization/types.js.map +1 -0
- package/dist/services/batch-delegation.service.d.ts +53 -0
- package/dist/services/batch-delegation.service.d.ts.map +1 -0
- package/dist/services/batch-delegation.service.js +95 -0
- package/dist/services/batch-delegation.service.js.map +1 -0
- package/dist/services/oauth-config.service.d.ts +53 -0
- package/dist/services/oauth-config.service.d.ts.map +1 -0
- package/dist/services/oauth-config.service.js +117 -0
- package/dist/services/oauth-config.service.js.map +1 -0
- package/dist/services/oauth-provider-registry.d.ts +77 -0
- package/dist/services/oauth-provider-registry.d.ts.map +1 -0
- package/dist/services/oauth-provider-registry.js +112 -0
- package/dist/services/oauth-provider-registry.js.map +1 -0
- package/dist/services/oauth-service.d.ts +77 -0
- package/dist/services/oauth-service.d.ts.map +1 -0
- package/dist/services/oauth-service.js +348 -0
- package/dist/services/oauth-service.js.map +1 -0
- package/dist/services/oauth-token-retrieval.service.d.ts +49 -0
- package/dist/services/oauth-token-retrieval.service.d.ts.map +1 -0
- package/dist/services/oauth-token-retrieval.service.js +150 -0
- package/dist/services/oauth-token-retrieval.service.js.map +1 -0
- package/dist/services/provider-resolver.d.ts +48 -0
- package/dist/services/provider-resolver.d.ts.map +1 -0
- package/dist/services/provider-resolver.js +120 -0
- package/dist/services/provider-resolver.js.map +1 -0
- package/dist/services/provider-validator.d.ts +55 -0
- package/dist/services/provider-validator.d.ts.map +1 -0
- package/dist/services/provider-validator.js +135 -0
- package/dist/services/provider-validator.js.map +1 -0
- package/dist/services/tool-context-builder.d.ts +57 -0
- package/dist/services/tool-context-builder.d.ts.map +1 -0
- package/dist/services/tool-context-builder.js +125 -0
- package/dist/services/tool-context-builder.js.map +1 -0
- package/dist/services/tool-protection.service.d.ts +87 -10
- package/dist/services/tool-protection.service.d.ts.map +1 -1
- package/dist/services/tool-protection.service.js +282 -112
- package/dist/services/tool-protection.service.js.map +1 -1
- package/dist/types/oauth-required-error.d.ts +40 -0
- package/dist/types/oauth-required-error.d.ts.map +1 -0
- package/dist/types/oauth-required-error.js +40 -0
- package/dist/types/oauth-required-error.js.map +1 -0
- package/dist/utils/did-helpers.d.ts +33 -0
- package/dist/utils/did-helpers.d.ts.map +1 -1
- package/dist/utils/did-helpers.js +40 -0
- package/dist/utils/did-helpers.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/docs/API_REFERENCE.md +1362 -0
- package/docs/COMPLIANCE_MATRIX.md +691 -0
- package/docs/STATUSLIST2021_GUIDE.md +696 -0
- package/docs/W3C_VC_DELEGATION_GUIDE.md +710 -0
- package/package.json +24 -50
- package/scripts/audit-compliance.ts +724 -0
- package/src/__tests__/cache/tool-protection-cache.test.ts +640 -0
- package/src/__tests__/config/provider-runtime-config.test.ts +309 -0
- package/src/__tests__/delegation-e2e.test.ts +690 -0
- package/src/__tests__/identity/user-did-manager.test.ts +213 -0
- package/src/__tests__/index.test.ts +56 -0
- package/src/__tests__/integration/full-flow.test.ts +776 -0
- package/src/__tests__/integration.test.ts +281 -0
- package/src/__tests__/providers/base.test.ts +173 -0
- package/src/__tests__/providers/memory.test.ts +319 -0
- package/src/__tests__/regression/phase2-regression.test.ts +427 -0
- package/src/__tests__/runtime/audit-logger.test.ts +154 -0
- package/src/__tests__/runtime/base-extensions.test.ts +593 -0
- package/src/__tests__/runtime/base.test.ts +869 -0
- package/src/__tests__/runtime/delegation-flow.test.ts +164 -0
- package/src/__tests__/runtime/proof-client-did.test.ts +375 -0
- package/src/__tests__/runtime/route-interception.test.ts +686 -0
- package/src/__tests__/runtime/tool-protection-enforcement.test.ts +908 -0
- package/src/__tests__/services/agentshield-integration.test.ts +784 -0
- package/src/__tests__/services/provider-resolver-edge-cases.test.ts +487 -0
- package/src/__tests__/services/tool-protection-oauth-provider.test.ts +480 -0
- package/src/__tests__/services/tool-protection.service.test.ts +1366 -0
- package/src/__tests__/utils/mock-providers.ts +340 -0
- package/src/cache/oauth-config-cache.d.ts +69 -0
- package/src/cache/oauth-config-cache.d.ts.map +1 -0
- package/src/cache/oauth-config-cache.js +71 -0
- package/src/cache/oauth-config-cache.js.map +1 -0
- package/src/cache/oauth-config-cache.ts +123 -0
- package/src/cache/tool-protection-cache.ts +171 -0
- package/src/compliance/EXAMPLE.md +412 -0
- package/src/compliance/__tests__/schema-verifier.test.ts +797 -0
- package/src/compliance/index.ts +8 -0
- package/src/compliance/schema-registry.ts +460 -0
- package/src/compliance/schema-verifier.ts +708 -0
- package/src/config/__tests__/remote-config.spec.ts +268 -0
- package/src/config/remote-config.ts +174 -0
- package/src/config.ts +309 -0
- package/src/delegation/__tests__/audience-validator.test.ts +112 -0
- package/src/delegation/__tests__/bitstring.test.ts +346 -0
- package/src/delegation/__tests__/cascading-revocation.test.ts +628 -0
- package/src/delegation/__tests__/delegation-graph.test.ts +584 -0
- package/src/delegation/__tests__/utils.test.ts +152 -0
- package/src/delegation/__tests__/vc-issuer.test.ts +442 -0
- package/src/delegation/__tests__/vc-verifier.test.ts +922 -0
- package/src/delegation/audience-validator.ts +52 -0
- package/src/delegation/bitstring.ts +278 -0
- package/src/delegation/cascading-revocation.ts +370 -0
- package/src/delegation/delegation-graph.ts +299 -0
- package/src/delegation/index.ts +14 -0
- package/src/delegation/statuslist-manager.ts +353 -0
- package/src/delegation/storage/__tests__/memory-graph-storage.test.ts +366 -0
- package/src/delegation/storage/__tests__/memory-statuslist-storage.test.ts +228 -0
- package/src/delegation/storage/index.ts +9 -0
- package/src/delegation/storage/memory-graph-storage.ts +178 -0
- package/src/delegation/storage/memory-statuslist-storage.ts +77 -0
- package/src/delegation/utils.ts +42 -0
- package/src/delegation/vc-issuer.ts +232 -0
- package/src/delegation/vc-verifier.ts +568 -0
- package/src/identity/idp-token-resolver.ts +147 -0
- package/src/identity/idp-token-storage.interface.ts +59 -0
- package/src/identity/user-did-manager.ts +370 -0
- package/src/index.ts +260 -0
- package/src/providers/base.d.ts +91 -0
- package/src/providers/base.d.ts.map +1 -0
- package/src/providers/base.js +38 -0
- package/src/providers/base.js.map +1 -0
- package/src/providers/base.ts +96 -0
- package/src/providers/memory.ts +142 -0
- package/src/runtime/audit-logger.ts +39 -0
- package/src/runtime/base.ts +1329 -0
- package/src/services/__tests__/access-control.integration.test.ts +443 -0
- package/src/services/__tests__/access-control.proof-response-validation.test.ts +578 -0
- package/src/services/__tests__/access-control.service.test.ts +970 -0
- package/src/services/__tests__/batch-delegation.service.test.ts +351 -0
- package/src/services/__tests__/crypto.service.test.ts +531 -0
- package/src/services/__tests__/oauth-provider-registry.test.ts +142 -0
- package/src/services/__tests__/proof-verifier.integration.test.ts +485 -0
- package/src/services/__tests__/proof-verifier.test.ts +489 -0
- package/src/services/__tests__/provider-resolution.integration.test.ts +198 -0
- package/src/services/__tests__/provider-resolver.test.ts +217 -0
- package/src/services/__tests__/storage.service.test.ts +358 -0
- package/src/services/access-control.service.ts +990 -0
- package/src/services/authorization/authorization-registry.ts +66 -0
- package/src/services/authorization/types.ts +71 -0
- package/src/services/batch-delegation.service.ts +137 -0
- package/src/services/crypto.service.ts +302 -0
- package/src/services/errors.ts +76 -0
- package/src/services/index.ts +9 -0
- package/src/services/oauth-config.service.d.ts +53 -0
- package/src/services/oauth-config.service.d.ts.map +1 -0
- package/src/services/oauth-config.service.js +113 -0
- package/src/services/oauth-config.service.js.map +1 -0
- package/src/services/oauth-config.service.ts +166 -0
- package/src/services/oauth-provider-registry.d.ts +57 -0
- package/src/services/oauth-provider-registry.d.ts.map +1 -0
- package/src/services/oauth-provider-registry.js +73 -0
- package/src/services/oauth-provider-registry.js.map +1 -0
- package/src/services/oauth-provider-registry.ts +123 -0
- package/src/services/oauth-service.ts +510 -0
- package/src/services/oauth-token-retrieval.service.ts +245 -0
- package/src/services/proof-verifier.ts +478 -0
- package/src/services/provider-resolver.d.ts +48 -0
- package/src/services/provider-resolver.d.ts.map +1 -0
- package/src/services/provider-resolver.js +106 -0
- package/src/services/provider-resolver.js.map +1 -0
- package/src/services/provider-resolver.ts +144 -0
- package/src/services/provider-validator.ts +170 -0
- package/src/services/storage.service.ts +566 -0
- package/src/services/tool-context-builder.ts +172 -0
- package/src/services/tool-protection.service.ts +958 -0
- package/src/types/oauth-required-error.ts +63 -0
- package/src/types/tool-protection.ts +155 -0
- package/src/utils/__tests__/did-helpers.test.ts +101 -0
- package/src/utils/base64.ts +148 -0
- package/src/utils/cors.ts +83 -0
- package/src/utils/did-helpers.ts +150 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/storage-keys.ts +278 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +56 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDP Token Storage Interface
|
|
3
|
+
*
|
|
4
|
+
* Platform-agnostic interface for storing and retrieving IDP tokens.
|
|
5
|
+
* Platform-specific implementations (Cloudflare KV, Node.js database, etc.)
|
|
6
|
+
* implement this interface.
|
|
7
|
+
*
|
|
8
|
+
* @package @kya-os/mcp-i-core
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { IdpTokens } from "@kya-os/contracts/config";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Interface for IDP token storage
|
|
15
|
+
*/
|
|
16
|
+
export interface IIdpTokenStorage {
|
|
17
|
+
/**
|
|
18
|
+
* Store IDP tokens
|
|
19
|
+
*
|
|
20
|
+
* @param userDid - User DID to associate tokens with
|
|
21
|
+
* @param provider - OAuth provider name
|
|
22
|
+
* @param scopes - Scopes granted for these tokens
|
|
23
|
+
* @param tokens - IDP tokens to store
|
|
24
|
+
*/
|
|
25
|
+
storeToken(
|
|
26
|
+
userDid: string,
|
|
27
|
+
provider: string,
|
|
28
|
+
scopes: string[],
|
|
29
|
+
tokens: IdpTokens
|
|
30
|
+
): Promise<void>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve IDP tokens
|
|
34
|
+
*
|
|
35
|
+
* @param userDid - User DID to retrieve tokens for
|
|
36
|
+
* @param provider - OAuth provider name
|
|
37
|
+
* @param scopes - Scopes to retrieve tokens for
|
|
38
|
+
* @returns IDP tokens or null if not found
|
|
39
|
+
*/
|
|
40
|
+
getToken(
|
|
41
|
+
userDid: string,
|
|
42
|
+
provider: string,
|
|
43
|
+
scopes: string[]
|
|
44
|
+
): Promise<IdpTokens | null>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delete IDP tokens
|
|
48
|
+
*
|
|
49
|
+
* @param userDid - User DID
|
|
50
|
+
* @param provider - OAuth provider name
|
|
51
|
+
* @param scopes - Scopes
|
|
52
|
+
*/
|
|
53
|
+
deleteToken(
|
|
54
|
+
userDid: string,
|
|
55
|
+
provider: string,
|
|
56
|
+
scopes: string[]
|
|
57
|
+
): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User DID Manager
|
|
3
|
+
*
|
|
4
|
+
* Handles ephemeral user DID generation for MCP-I sessions.
|
|
5
|
+
* Generates did:key DIDs for users when they join a chat session.
|
|
6
|
+
*
|
|
7
|
+
* This enables tracking which client/user initiated tool calls without
|
|
8
|
+
* requiring user registration or persistent identity.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { CryptoProvider } from '../providers/base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* OAuth identity for persistent user DID lookup
|
|
15
|
+
*/
|
|
16
|
+
export interface OAuthIdentity {
|
|
17
|
+
/**
|
|
18
|
+
* OAuth provider name (e.g., "google", "github", "microsoft")
|
|
19
|
+
*/
|
|
20
|
+
provider: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* OAuth subject identifier (unique user ID from provider)
|
|
24
|
+
*/
|
|
25
|
+
subject: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* User's email address from OAuth provider (optional)
|
|
29
|
+
*/
|
|
30
|
+
email?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* User's display name from OAuth provider (optional)
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* User DID storage interface
|
|
40
|
+
*/
|
|
41
|
+
export interface UserDidStorage {
|
|
42
|
+
/**
|
|
43
|
+
* Get user DID for a session
|
|
44
|
+
*/
|
|
45
|
+
get(sessionId: string): Promise<string | null>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Store user DID for a session
|
|
49
|
+
*/
|
|
50
|
+
set(sessionId: string, did: string, ttl?: number): Promise<void>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Delete user DID for a session
|
|
54
|
+
*/
|
|
55
|
+
delete(sessionId: string): Promise<void>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get user DID by OAuth identity (optional - for persistent user DID lookup)
|
|
59
|
+
* If not implemented, OAuth-based lookup will be skipped
|
|
60
|
+
*/
|
|
61
|
+
getByOAuth?(provider: string, subject: string): Promise<string | null>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Store user DID mapping for OAuth identity (optional - for persistent user DID storage)
|
|
65
|
+
* If not implemented, OAuth-based storage will be skipped
|
|
66
|
+
*/
|
|
67
|
+
setByOAuth?(provider: string, subject: string, did: string, ttl?: number): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* User DID Manager configuration
|
|
72
|
+
*/
|
|
73
|
+
export interface UserDidManagerConfig {
|
|
74
|
+
/**
|
|
75
|
+
* Storage provider for user DIDs (optional)
|
|
76
|
+
* If not provided, user DIDs are ephemeral (not persisted)
|
|
77
|
+
*/
|
|
78
|
+
storage?: UserDidStorage;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Crypto provider for DID generation
|
|
82
|
+
*/
|
|
83
|
+
crypto: CryptoProvider;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Generate did:web format instead of did:key (requires additional setup)
|
|
87
|
+
*/
|
|
88
|
+
useDidWeb?: boolean;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Base URL for did:web (required if useDidWeb is true)
|
|
92
|
+
*/
|
|
93
|
+
didWebBaseUrl?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* User DID Manager
|
|
98
|
+
*
|
|
99
|
+
* Generates and manages user DIDs for MCP-I sessions.
|
|
100
|
+
* Supports both ephemeral (did:key) and persistent (did:web) formats.
|
|
101
|
+
*/
|
|
102
|
+
export class UserDidManager {
|
|
103
|
+
private config: UserDidManagerConfig;
|
|
104
|
+
private sessionDidCache = new Map<string, string>();
|
|
105
|
+
|
|
106
|
+
constructor(config: UserDidManagerConfig) {
|
|
107
|
+
this.config = config;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Generate or retrieve user DID for a session
|
|
112
|
+
*
|
|
113
|
+
* If a user DID already exists for the session, it is returned.
|
|
114
|
+
* If OAuth identity is provided, checks for persistent user DID mapping first.
|
|
115
|
+
* Otherwise, a new ephemeral did:key is generated.
|
|
116
|
+
*
|
|
117
|
+
* @param sessionId - MCP session ID
|
|
118
|
+
* @param oauthIdentity - Optional OAuth identity for persistent user DID lookup
|
|
119
|
+
* @returns User DID (did:key format)
|
|
120
|
+
*
|
|
121
|
+
* @remarks
|
|
122
|
+
* - If OAuth identity provided, checks for existing mapping first
|
|
123
|
+
* - Falls back to ephemeral DID generation if OAuth unavailable
|
|
124
|
+
* - Caches result in session storage for performance
|
|
125
|
+
*/
|
|
126
|
+
async getOrCreateUserDid(sessionId: string, oauthIdentity?: OAuthIdentity | null): Promise<string> {
|
|
127
|
+
// Check cache first
|
|
128
|
+
if (this.sessionDidCache.has(sessionId)) {
|
|
129
|
+
return this.sessionDidCache.get(sessionId)!;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// PRIORITY 1: If OAuth identity provided, check for persistent user DID mapping
|
|
133
|
+
if (oauthIdentity && oauthIdentity.provider && oauthIdentity.subject && this.config.storage?.getByOAuth) {
|
|
134
|
+
try {
|
|
135
|
+
const persistentUserDid = await this.config.storage.getByOAuth(
|
|
136
|
+
oauthIdentity.provider,
|
|
137
|
+
oauthIdentity.subject
|
|
138
|
+
);
|
|
139
|
+
if (persistentUserDid) {
|
|
140
|
+
console.log('[UserDidManager] Found persistent user DID from OAuth mapping:', {
|
|
141
|
+
provider: oauthIdentity.provider,
|
|
142
|
+
userDid: persistentUserDid.substring(0, 20) + '...',
|
|
143
|
+
});
|
|
144
|
+
// Cache it for this session
|
|
145
|
+
this.sessionDidCache.set(sessionId, persistentUserDid);
|
|
146
|
+
// Also store in session storage for faster future lookups
|
|
147
|
+
if (this.config.storage) {
|
|
148
|
+
try {
|
|
149
|
+
await this.config.storage.set(sessionId, persistentUserDid, 1800); // 30 minutes TTL
|
|
150
|
+
} catch (error) {
|
|
151
|
+
// Log but continue - DID is cached and will be returned
|
|
152
|
+
console.warn('[UserDidManager] Failed to cache persistent DID in session storage:', error);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return persistentUserDid;
|
|
156
|
+
}
|
|
157
|
+
} catch (error) {
|
|
158
|
+
// Log but continue - will check session storage or generate new DID
|
|
159
|
+
console.warn('[UserDidManager] OAuth lookup failed, falling back to session storage:', error);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// PRIORITY 2: Check session storage if available
|
|
164
|
+
if (this.config.storage) {
|
|
165
|
+
try {
|
|
166
|
+
const storedDid = await this.config.storage.get(sessionId);
|
|
167
|
+
if (storedDid) {
|
|
168
|
+
this.sessionDidCache.set(sessionId, storedDid);
|
|
169
|
+
// If OAuth identity provided but no persistent mapping found, create one now
|
|
170
|
+
if (oauthIdentity && oauthIdentity.provider && oauthIdentity.subject && this.config.storage.setByOAuth) {
|
|
171
|
+
try {
|
|
172
|
+
await this.config.storage.setByOAuth(
|
|
173
|
+
oauthIdentity.provider,
|
|
174
|
+
oauthIdentity.subject,
|
|
175
|
+
storedDid,
|
|
176
|
+
90 * 24 * 60 * 60 // 90 days TTL for persistent mapping
|
|
177
|
+
);
|
|
178
|
+
console.log('[UserDidManager] Created persistent OAuth mapping for existing user DID:', {
|
|
179
|
+
provider: oauthIdentity.provider,
|
|
180
|
+
userDid: storedDid.substring(0, 20) + '...',
|
|
181
|
+
});
|
|
182
|
+
} catch (error) {
|
|
183
|
+
// Log but continue - mapping creation failed, but DID is still valid
|
|
184
|
+
console.warn('[UserDidManager] Failed to create OAuth mapping:', error);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return storedDid;
|
|
188
|
+
}
|
|
189
|
+
} catch (error) {
|
|
190
|
+
// Log but continue - will generate new DID
|
|
191
|
+
console.warn('[UserDidManager] Storage.get failed, generating new DID:', error);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// PRIORITY 3: Generate new user DID
|
|
196
|
+
const userDid = await this.generateUserDid();
|
|
197
|
+
|
|
198
|
+
// Cache it
|
|
199
|
+
this.sessionDidCache.set(sessionId, userDid);
|
|
200
|
+
|
|
201
|
+
// Store it if storage is available
|
|
202
|
+
if (this.config.storage) {
|
|
203
|
+
try {
|
|
204
|
+
await this.config.storage.set(sessionId, userDid, 1800); // 30 minutes TTL
|
|
205
|
+
} catch (error) {
|
|
206
|
+
// Log but continue - DID is cached and will be returned
|
|
207
|
+
console.warn('[UserDidManager] Storage.set failed, continuing with cached DID:', error);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// If OAuth identity provided, create persistent mapping
|
|
212
|
+
if (oauthIdentity && oauthIdentity.provider && oauthIdentity.subject && this.config.storage?.setByOAuth) {
|
|
213
|
+
try {
|
|
214
|
+
await this.config.storage.setByOAuth(
|
|
215
|
+
oauthIdentity.provider,
|
|
216
|
+
oauthIdentity.subject,
|
|
217
|
+
userDid,
|
|
218
|
+
90 * 24 * 60 * 60 // 90 days TTL for persistent mapping
|
|
219
|
+
);
|
|
220
|
+
console.log('[UserDidManager] Created persistent OAuth mapping for new user DID:', {
|
|
221
|
+
provider: oauthIdentity.provider,
|
|
222
|
+
userDid: userDid.substring(0, 20) + '...',
|
|
223
|
+
});
|
|
224
|
+
} catch (error) {
|
|
225
|
+
// Log but continue - mapping creation failed, but DID is still valid
|
|
226
|
+
console.warn('[UserDidManager] Failed to create OAuth mapping:', error);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return userDid;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Generate a new ephemeral user DID
|
|
235
|
+
*
|
|
236
|
+
* Uses did:key format by default for simplicity.
|
|
237
|
+
* did:web can be used if configured, but requires additional setup.
|
|
238
|
+
*/
|
|
239
|
+
private async generateUserDid(): Promise<string> {
|
|
240
|
+
if (this.config.useDidWeb && this.config.didWebBaseUrl) {
|
|
241
|
+
// Generate did:web (requires web server setup)
|
|
242
|
+
// For now, fall back to did:key
|
|
243
|
+
// TODO: Implement did:web generation if needed
|
|
244
|
+
console.warn('[UserDidManager] did:web not yet implemented, using did:key');
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Generate Ed25519 keypair for user DID
|
|
248
|
+
const keyPair = await this.config.crypto.generateKeyPair();
|
|
249
|
+
|
|
250
|
+
// Extract public key bytes (32 bytes for Ed25519)
|
|
251
|
+
const publicKeyBytes = this.base64ToBytes(keyPair.publicKey);
|
|
252
|
+
|
|
253
|
+
// Generate did:key from public key
|
|
254
|
+
return this.generateDidKeyFromPublicKey(publicKeyBytes);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Generate did:key from Ed25519 public key bytes
|
|
259
|
+
* Following spec: https://w3c-ccg.github.io/did-method-key/
|
|
260
|
+
*
|
|
261
|
+
* Format: did:key:z<multibase-base58btc(<multicodec-ed25519-pub><publicKey>)>
|
|
262
|
+
*/
|
|
263
|
+
private generateDidKeyFromPublicKey(publicKeyBytes: Uint8Array): string {
|
|
264
|
+
// Ed25519 multicodec prefix (0xed 0x01)
|
|
265
|
+
const multicodecPrefix = new Uint8Array([0xed, 0x01]);
|
|
266
|
+
|
|
267
|
+
// Combine prefix + public key
|
|
268
|
+
const multicodecKey = new Uint8Array(multicodecPrefix.length + publicKeyBytes.length);
|
|
269
|
+
multicodecKey.set(multicodecPrefix);
|
|
270
|
+
multicodecKey.set(publicKeyBytes, multicodecPrefix.length);
|
|
271
|
+
|
|
272
|
+
// Base58 encode (using a simple implementation)
|
|
273
|
+
// Note: For production, consider using base-x library
|
|
274
|
+
const base58Encoded = this.base58Encode(multicodecKey);
|
|
275
|
+
|
|
276
|
+
// Add multibase prefix 'z' for base58-btc
|
|
277
|
+
return `did:key:z${base58Encoded}`;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Base58 encode (Bitcoin alphabet)
|
|
282
|
+
* Simple implementation for did:key generation
|
|
283
|
+
*/
|
|
284
|
+
private base58Encode(bytes: Uint8Array): string {
|
|
285
|
+
const alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
286
|
+
let num = BigInt(0);
|
|
287
|
+
|
|
288
|
+
// Convert bytes to big integer
|
|
289
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
290
|
+
num = num * BigInt(256) + BigInt(bytes[i]);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Convert to base58
|
|
294
|
+
let result = '';
|
|
295
|
+
while (num > 0) {
|
|
296
|
+
result = alphabet[Number(num % BigInt(58))] + result;
|
|
297
|
+
num = num / BigInt(58);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Add leading zeros
|
|
301
|
+
for (let i = 0; i < bytes.length && bytes[i] === 0; i++) {
|
|
302
|
+
result = '1' + result;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return result;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Convert base64 string to Uint8Array
|
|
310
|
+
*/
|
|
311
|
+
private base64ToBytes(base64: string): Uint8Array {
|
|
312
|
+
if (typeof Buffer !== 'undefined') {
|
|
313
|
+
// Node.js environment
|
|
314
|
+
return new Uint8Array(Buffer.from(base64, 'base64'));
|
|
315
|
+
} else {
|
|
316
|
+
// Browser/Workers environment
|
|
317
|
+
const binaryString = atob(base64);
|
|
318
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
319
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
320
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
321
|
+
}
|
|
322
|
+
return bytes;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Get user DID for a session without creating one
|
|
328
|
+
*/
|
|
329
|
+
async getUserDid(sessionId: string): Promise<string | null> {
|
|
330
|
+
// Check cache
|
|
331
|
+
if (this.sessionDidCache.has(sessionId)) {
|
|
332
|
+
return this.sessionDidCache.get(sessionId)!;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Check storage
|
|
336
|
+
if (this.config.storage) {
|
|
337
|
+
const storedDid = await this.config.storage.get(sessionId);
|
|
338
|
+
if (storedDid) {
|
|
339
|
+
this.sessionDidCache.set(sessionId, storedDid);
|
|
340
|
+
return storedDid;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Clear user DID for a session
|
|
349
|
+
*/
|
|
350
|
+
async clearUserDid(sessionId: string): Promise<void> {
|
|
351
|
+
this.sessionDidCache.delete(sessionId);
|
|
352
|
+
|
|
353
|
+
if (this.config.storage) {
|
|
354
|
+
try {
|
|
355
|
+
await this.config.storage.delete(sessionId);
|
|
356
|
+
} catch (error) {
|
|
357
|
+
// Log but continue - cache is already cleared
|
|
358
|
+
console.warn('[UserDidManager] Storage.delete failed, continuing:', error);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Clear all cached user DIDs (useful for testing)
|
|
365
|
+
*/
|
|
366
|
+
clearCache(): void {
|
|
367
|
+
this.sessionDidCache.clear();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kya-os/mcp-i-core
|
|
3
|
+
*
|
|
4
|
+
* Core provider-based architecture for MCP-I framework.
|
|
5
|
+
* Platform-agnostic runtime that can be extended for any environment.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Base providers
|
|
9
|
+
export {
|
|
10
|
+
CryptoProvider,
|
|
11
|
+
ClockProvider,
|
|
12
|
+
FetchProvider,
|
|
13
|
+
StorageProvider,
|
|
14
|
+
NonceCacheProvider,
|
|
15
|
+
IdentityProvider,
|
|
16
|
+
type AgentIdentity,
|
|
17
|
+
} from "./providers/base";
|
|
18
|
+
|
|
19
|
+
// Memory providers
|
|
20
|
+
export {
|
|
21
|
+
MemoryStorageProvider,
|
|
22
|
+
MemoryNonceCacheProvider,
|
|
23
|
+
MemoryIdentityProvider,
|
|
24
|
+
} from "./providers/memory";
|
|
25
|
+
|
|
26
|
+
// Runtime
|
|
27
|
+
export { MCPIRuntimeBase } from "./runtime/base";
|
|
28
|
+
export type { RuntimeWithAccessControl } from "./runtime/base";
|
|
29
|
+
|
|
30
|
+
// Audit Logger Interface
|
|
31
|
+
export type { IAuditLogger } from "./runtime/audit-logger";
|
|
32
|
+
|
|
33
|
+
// Utilities
|
|
34
|
+
export * from "./utils";
|
|
35
|
+
// Tool Protection
|
|
36
|
+
export { ToolProtectionService } from "./services/tool-protection.service";
|
|
37
|
+
|
|
38
|
+
// Crypto Service
|
|
39
|
+
export { CryptoService } from "./services/crypto.service";
|
|
40
|
+
|
|
41
|
+
export type { Ed25519JWK, ParsedJWS } from "./services/crypto.service";
|
|
42
|
+
|
|
43
|
+
// Proof Verifier Service
|
|
44
|
+
export { ProofVerifier } from "./services/proof-verifier";
|
|
45
|
+
|
|
46
|
+
export type {
|
|
47
|
+
ProofVerificationResult,
|
|
48
|
+
ProofVerifierConfig,
|
|
49
|
+
} from "./services/proof-verifier";
|
|
50
|
+
|
|
51
|
+
// Access Control API Service (stub for Phase 3)
|
|
52
|
+
export { AccessControlApiService } from "./services/access-control.service";
|
|
53
|
+
|
|
54
|
+
export type {
|
|
55
|
+
AccessControlApiServiceConfig,
|
|
56
|
+
AccessControlApiServiceMetrics,
|
|
57
|
+
} from "./services/access-control.service";
|
|
58
|
+
|
|
59
|
+
// OAuth Config Service (Phase 1)
|
|
60
|
+
export { OAuthConfigService } from "./services/oauth-config.service";
|
|
61
|
+
|
|
62
|
+
export type { OAuthConfigServiceConfig } from "./services/oauth-config.service";
|
|
63
|
+
|
|
64
|
+
// OAuth Service (Phase 1)
|
|
65
|
+
export { OAuthService } from "./services/oauth-service";
|
|
66
|
+
|
|
67
|
+
export type { OAuthServiceConfig } from "./services/oauth-service";
|
|
68
|
+
|
|
69
|
+
// Tool Context Builder (Phase 1)
|
|
70
|
+
export { ToolContextBuilder } from "./services/tool-context-builder";
|
|
71
|
+
|
|
72
|
+
export type { ToolContextBuilderConfig } from "./services/tool-context-builder";
|
|
73
|
+
|
|
74
|
+
// OAuth Provider Registry (Phase 2)
|
|
75
|
+
export { OAuthProviderRegistry } from "./services/oauth-provider-registry";
|
|
76
|
+
|
|
77
|
+
// Provider Resolver (Phase 2)
|
|
78
|
+
export { ProviderResolver } from "./services/provider-resolver";
|
|
79
|
+
|
|
80
|
+
// Provider Validator (Phase 3)
|
|
81
|
+
export { ProviderValidator, ProviderValidationError } from "./services/provider-validator";
|
|
82
|
+
|
|
83
|
+
// OAuth Token Retrieval Service (Phase 3)
|
|
84
|
+
export { OAuthTokenRetrievalService } from "./services/oauth-token-retrieval.service";
|
|
85
|
+
export type { OAuthTokenRetrievalServiceConfig } from "./services/oauth-token-retrieval.service";
|
|
86
|
+
|
|
87
|
+
// Batch Delegation Service (Phase 2)
|
|
88
|
+
export { BatchDelegationService } from "./services/batch-delegation.service";
|
|
89
|
+
export type { ToolGroup } from "./services/batch-delegation.service";
|
|
90
|
+
|
|
91
|
+
// OAuth Config Cache
|
|
92
|
+
export {
|
|
93
|
+
InMemoryOAuthConfigCache,
|
|
94
|
+
NoOpOAuthConfigCache,
|
|
95
|
+
} from "./cache/oauth-config-cache";
|
|
96
|
+
|
|
97
|
+
export type { OAuthConfigCache } from "./cache/oauth-config-cache";
|
|
98
|
+
|
|
99
|
+
// Storage Service Factory
|
|
100
|
+
export {
|
|
101
|
+
createStorageProviders,
|
|
102
|
+
StorageKeyHelpers,
|
|
103
|
+
migrateLegacyKeys,
|
|
104
|
+
} from "./services/storage.service";
|
|
105
|
+
|
|
106
|
+
export type {
|
|
107
|
+
StorageServiceConfig,
|
|
108
|
+
StorageProviders,
|
|
109
|
+
} from "./services/storage.service";
|
|
110
|
+
|
|
111
|
+
// Proof Verification Errors
|
|
112
|
+
export {
|
|
113
|
+
ProofVerificationError,
|
|
114
|
+
PROOF_VERIFICATION_ERROR_CODES,
|
|
115
|
+
createProofVerificationError,
|
|
116
|
+
} from "./services/errors";
|
|
117
|
+
|
|
118
|
+
export type { ProofVerificationErrorCode } from "./services/errors";
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
ToolProtectionCache,
|
|
122
|
+
InMemoryToolProtectionCache,
|
|
123
|
+
NoOpToolProtectionCache,
|
|
124
|
+
} from "./cache/tool-protection-cache";
|
|
125
|
+
|
|
126
|
+
export type {
|
|
127
|
+
ToolProtection,
|
|
128
|
+
ToolProtectionConfig,
|
|
129
|
+
ToolProtectionServiceConfig,
|
|
130
|
+
} from "./types/tool-protection";
|
|
131
|
+
|
|
132
|
+
export { DelegationRequiredError } from "./types/tool-protection";
|
|
133
|
+
export { OAuthRequiredError } from "./types/oauth-required-error";
|
|
134
|
+
export type { OAuthRequiredErrorOptions } from "./types/oauth-required-error";
|
|
135
|
+
|
|
136
|
+
// Delegation (W3C VC-based)
|
|
137
|
+
export {
|
|
138
|
+
DelegationCredentialIssuer,
|
|
139
|
+
createDelegationIssuer,
|
|
140
|
+
type IssueDelegationOptions,
|
|
141
|
+
type VCSigningFunction,
|
|
142
|
+
type IdentityProvider as DelegationIdentityProvider,
|
|
143
|
+
} from "./delegation/vc-issuer";
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
DelegationCredentialVerifier,
|
|
147
|
+
createDelegationVerifier,
|
|
148
|
+
type DelegationVCVerificationResult,
|
|
149
|
+
type VerifyDelegationVCOptions,
|
|
150
|
+
type DIDResolver,
|
|
151
|
+
type DIDDocument,
|
|
152
|
+
type VerificationMethod,
|
|
153
|
+
type StatusListResolver,
|
|
154
|
+
type SignatureVerificationFunction,
|
|
155
|
+
} from "./delegation/vc-verifier";
|
|
156
|
+
|
|
157
|
+
// StatusList2021
|
|
158
|
+
export {
|
|
159
|
+
StatusList2021Manager,
|
|
160
|
+
createStatusListManager,
|
|
161
|
+
type StatusListStorageProvider,
|
|
162
|
+
type StatusListIdentityProvider,
|
|
163
|
+
} from "./delegation/statuslist-manager";
|
|
164
|
+
|
|
165
|
+
export {
|
|
166
|
+
BitstringManager,
|
|
167
|
+
isIndexSet,
|
|
168
|
+
type CompressionFunction,
|
|
169
|
+
type DecompressionFunction,
|
|
170
|
+
} from "./delegation/bitstring";
|
|
171
|
+
|
|
172
|
+
// Delegation Graph & Cascading Revocation
|
|
173
|
+
export {
|
|
174
|
+
DelegationGraphManager,
|
|
175
|
+
createDelegationGraph,
|
|
176
|
+
type DelegationNode,
|
|
177
|
+
type DelegationGraphStorageProvider,
|
|
178
|
+
} from "./delegation/delegation-graph";
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
CascadingRevocationManager,
|
|
182
|
+
createCascadingRevocationManager,
|
|
183
|
+
type RevocationEvent,
|
|
184
|
+
type RevocationHook,
|
|
185
|
+
type CascadingRevocationOptions,
|
|
186
|
+
} from "./delegation/cascading-revocation";
|
|
187
|
+
|
|
188
|
+
// Storage Implementations (for testing and examples)
|
|
189
|
+
export { MemoryStatusListStorage } from "./delegation/storage/memory-statuslist-storage";
|
|
190
|
+
|
|
191
|
+
export { MemoryDelegationGraphStorage } from "./delegation/storage/memory-graph-storage";
|
|
192
|
+
|
|
193
|
+
// Compliance Verification (with JSON Schema draft-07 support)
|
|
194
|
+
export {
|
|
195
|
+
SchemaVerifier,
|
|
196
|
+
createSchemaVerifier,
|
|
197
|
+
type SchemaMetadata,
|
|
198
|
+
type FieldComplianceResult,
|
|
199
|
+
type SchemaComplianceReport,
|
|
200
|
+
type FullComplianceReport,
|
|
201
|
+
} from "./compliance/schema-verifier";
|
|
202
|
+
|
|
203
|
+
export {
|
|
204
|
+
SCHEMA_REGISTRY,
|
|
205
|
+
getAllSchemas,
|
|
206
|
+
getSchemasByCategory,
|
|
207
|
+
getSchemaById,
|
|
208
|
+
getCriticalSchemas,
|
|
209
|
+
getSchemaStats,
|
|
210
|
+
} from "./compliance/schema-registry";
|
|
211
|
+
|
|
212
|
+
export { canonicalizeJSON } from "./delegation/utils";
|
|
213
|
+
|
|
214
|
+
// Re-export commonly used types from contracts
|
|
215
|
+
// Note: @kya-os/contracts exports are at the root level
|
|
216
|
+
import type {
|
|
217
|
+
HandshakeRequest,
|
|
218
|
+
SessionContext,
|
|
219
|
+
NonceCache,
|
|
220
|
+
NonceCacheEntry,
|
|
221
|
+
NonceCacheConfig,
|
|
222
|
+
ProofMeta,
|
|
223
|
+
DetachedProof,
|
|
224
|
+
CanonicalHashes,
|
|
225
|
+
AuditRecord,
|
|
226
|
+
} from "@kya-os/contracts";
|
|
227
|
+
|
|
228
|
+
export type {
|
|
229
|
+
HandshakeRequest,
|
|
230
|
+
SessionContext,
|
|
231
|
+
NonceCache,
|
|
232
|
+
NonceCacheEntry,
|
|
233
|
+
NonceCacheConfig,
|
|
234
|
+
ProofMeta,
|
|
235
|
+
DetachedProof,
|
|
236
|
+
CanonicalHashes,
|
|
237
|
+
AuditRecord,
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// Configuration types and utilities
|
|
241
|
+
export * from "./config";
|
|
242
|
+
|
|
243
|
+
// Remote configuration fetching
|
|
244
|
+
export {
|
|
245
|
+
fetchRemoteConfig,
|
|
246
|
+
type RemoteConfigCache,
|
|
247
|
+
type RemoteConfigOptions,
|
|
248
|
+
} from "./config/remote-config";
|
|
249
|
+
|
|
250
|
+
// User DID Manager (Phase 4)
|
|
251
|
+
export { UserDidManager } from "./identity/user-did-manager";
|
|
252
|
+
export type {
|
|
253
|
+
UserDidStorage,
|
|
254
|
+
UserDidManagerConfig,
|
|
255
|
+
} from "./identity/user-did-manager";
|
|
256
|
+
|
|
257
|
+
// IDP Token Resolver (Phase 1 - MH-7)
|
|
258
|
+
export { IdpTokenResolver } from "./identity/idp-token-resolver";
|
|
259
|
+
export type { IdpTokenResolverConfig } from "./identity/idp-token-resolver";
|
|
260
|
+
export type { IIdpTokenStorage } from "./identity/idp-token-storage.interface";
|