@frontmcp/auth 1.10.16 → 1.11.0-rc.1
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/browser/authorities/authorities.context.mjs +115 -0
- package/browser/authorities/authorities.engine.mjs +272 -0
- package/browser/authorities/authorities.errors.mjs +59 -0
- package/browser/authorities/authorities.evaluator.mjs +225 -0
- package/browser/authorities/authorities.metadata-augment.mjs +18 -0
- package/browser/authorities/authorities.registry.mjs +112 -0
- package/browser/authorities/authorities.schema.mjs +92 -0
- package/browser/authorities/authorities.scope-mapping.mjs +30 -0
- package/browser/authorities/authorities.validation.mjs +208 -0
- package/browser/authorities/index.mjs +43 -0
- package/browser/authorization/authorization.class.mjs +252 -0
- package/browser/authorization/authorization.types.mjs +64 -0
- package/browser/authorization/dcr-client.registry.mjs +222 -0
- package/browser/authorization/index.mjs +41 -0
- package/browser/authorization/orchestrated.accessor.mjs +86 -0
- package/browser/authorization/orchestrated.authorization.mjs +289 -0
- package/browser/authorization/public.authorization.mjs +124 -0
- package/browser/authorization/transparent.authorization.mjs +130 -0
- package/browser/cimd/cimd-redis.cache.mjs +231 -0
- package/browser/cimd/cimd.cache.mjs +215 -0
- package/browser/cimd/cimd.errors.mjs +142 -0
- package/browser/cimd/cimd.logger.mjs +15 -0
- package/browser/cimd/cimd.service.mjs +376 -0
- package/browser/cimd/cimd.types.mjs +228 -0
- package/browser/cimd/cimd.validator.mjs +217 -0
- package/browser/cimd/index.mjs +63 -0
- package/browser/common/auth-logger.interface.mjs +14 -0
- package/browser/common/index.mjs +6 -0
- package/browser/common/jwt.types.mjs +38 -0
- package/browser/common/session-user.types.mjs +0 -0
- package/browser/common/session.types.mjs +58 -0
- package/browser/common/zod-utils.mjs +0 -0
- package/browser/consent/consent.types.mjs +94 -0
- package/browser/consent/index.mjs +17 -0
- package/browser/context/frontmcp-auth-context.factory.mjs +29 -0
- package/browser/context/frontmcp-auth-context.impl.mjs +112 -0
- package/browser/context/index.mjs +7 -0
- package/browser/detection/auth-provider-detection.mjs +176 -0
- package/browser/detection/index.mjs +19 -0
- package/browser/errors/auth-internal.error.mjs +42 -0
- package/browser/errors/auth-internal.errors.mjs +150 -0
- package/browser/errors/index.mjs +53 -0
- package/browser/fetch/fetch-credential-middleware.mjs +91 -0
- package/browser/fetch/index.mjs +19 -0
- package/browser/index.mjs +573 -0
- package/browser/jwks/index.mjs +9 -0
- package/browser/jwks/jose.loader.mjs +28 -0
- package/browser/jwks/jwks.service.mjs +521 -0
- package/browser/jwks/jwks.utils.mjs +33 -0
- package/browser/options/app-auth.schema.mjs +18 -0
- package/browser/options/index.mjs +89 -0
- package/browser/options/orchestrated.schema.mjs +128 -0
- package/browser/options/public.schema.mjs +39 -0
- package/browser/options/schema.mjs +16 -0
- package/browser/options/shared.schemas.mjs +506 -0
- package/browser/options/static.schema.mjs +41 -0
- package/browser/options/transparent.schema.mjs +43 -0
- package/browser/options/utils.mjs +47 -0
- package/browser/people/index.mjs +15 -0
- package/browser/people/loopback-token.auth.mjs +115 -0
- package/browser/people/people-auth.options.mjs +37 -0
- package/browser/session/authorization-vault.mjs +279 -0
- package/browser/session/authorization.store.mjs +336 -0
- package/browser/session/consent.store.mjs +34 -0
- package/browser/session/credential-resume-link.mjs +43 -0
- package/browser/session/credentials-accessor.impl.mjs +54 -0
- package/browser/session/credentials-accessor.mjs +5 -0
- package/browser/session/encrypted-authorization-vault.mjs +405 -0
- package/browser/session/federated-auth.session.mjs +176 -0
- package/browser/session/incremental-auth-ticket.mjs +42 -0
- package/browser/session/index.mjs +266 -0
- package/browser/session/orchestrated-token.crypto.mjs +47 -0
- package/browser/session/orchestrated-token.store.mjs +286 -0
- package/browser/session/pending-login.mjs +37 -0
- package/browser/session/redis-session.store.mjs +255 -0
- package/browser/session/secure-store-accessor.impl.mjs +78 -0
- package/browser/session/secure-store-accessor.mjs +5 -0
- package/browser/session/secure-store-backends.mjs +111 -0
- package/browser/session/secure-store.factory.mjs +77 -0
- package/browser/session/session-credential-vault.factory.mjs +18 -0
- package/browser/session/session-credential-vault.mjs +243 -0
- package/browser/session/session-crypto.mjs +39 -0
- package/browser/session/session-rate-limiter.mjs +126 -0
- package/browser/session/session.transport.mjs +16 -0
- package/browser/session/signin-binding.mjs +30 -0
- package/browser/session/storage/in-memory-authorization-vault.mjs +28 -0
- package/browser/session/storage/index.mjs +14 -0
- package/browser/session/storage/storage-authorization-vault.mjs +301 -0
- package/browser/session/storage/storage-token-store.mjs +83 -0
- package/browser/session/storage-authorization.store.mjs +134 -0
- package/browser/session/storage-consent.store.mjs +33 -0
- package/browser/session/storage-federated-auth.session.mjs +55 -0
- package/browser/session/storage-orchestrated-token.store.mjs +197 -0
- package/browser/session/token-storage.factory.mjs +58 -0
- package/browser/session/token.refresh.mjs +36 -0
- package/browser/session/token.vault.mjs +61 -0
- package/browser/session/transport-session.types.mjs +108 -0
- package/browser/session/utils/auth-token.utils.mjs +58 -0
- package/browser/session/utils/index.mjs +23 -0
- package/browser/session/utils/session-crypto.utils.mjs +49 -0
- package/browser/session/utils/tiny-ttl-cache.mjs +46 -0
- package/browser/session/vault-encryption.mjs +187 -0
- package/browser/session/vercel-kv-session.store.mjs +230 -0
- package/browser/shared-server/index.mjs +17 -0
- package/browser/shared-server/shared-server-identity.mjs +55 -0
- package/browser/ui/base-layout.mjs +184 -0
- package/browser/ui/index.mjs +51 -0
- package/browser/ui/local-login.helper.mjs +46 -0
- package/browser/ui/templates.mjs +482 -0
- package/browser/utils/audience.validator.mjs +110 -0
- package/browser/utils/authorization-id.utils.mjs +10 -0
- package/browser/utils/index.mjs +45 -0
- package/browser/utils/redirect-uri.utils.mjs +22 -0
- package/browser/utils/scope-grant.utils.mjs +36 -0
- package/browser/utils/token-scopes.utils.mjs +12 -0
- package/browser/utils/www-authenticate.utils.mjs +164 -0
- package/browser/vault/auth-providers.accessor.impl.mjs +236 -0
- package/browser/vault/auth-providers.accessor.mjs +5 -0
- package/browser/vault/auth-providers.registry.mjs +140 -0
- package/browser/vault/auth-providers.types.mjs +47 -0
- package/browser/vault/auth-providers.vault.mjs +206 -0
- package/browser/vault/credential-cache.mjs +187 -0
- package/browser/vault/credential-helpers.mjs +15 -0
- package/browser/vault/credential-loaders/eager-loader.mjs +91 -0
- package/browser/vault/credential-loaders/lazy-loader.mjs +120 -0
- package/browser/vault/index.mjs +35 -0
- package/cimd/cimd.types.d.ts +1 -1
- package/cimd/cimd.types.d.ts.map +1 -1
- package/common/jwt.types.d.ts +1 -1
- package/common/jwt.types.d.ts.map +1 -1
- package/common/session.types.d.ts +9 -1
- package/common/session.types.d.ts.map +1 -1
- package/consent/consent.types.d.ts +1 -1
- package/consent/consent.types.d.ts.map +1 -1
- package/detection/auth-provider-detection.d.ts +1 -1
- package/detection/auth-provider-detection.d.ts.map +1 -1
- package/errors/auth-internal.errors.d.ts +6 -0
- package/errors/auth-internal.errors.d.ts.map +1 -1
- package/errors/index.d.ts +1 -1
- package/errors/index.d.ts.map +1 -1
- package/esm/index.mjs +2 -2
- package/esm/package.json +21 -5
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/options/app-auth.schema.d.ts +19 -1
- package/options/app-auth.schema.d.ts.map +1 -1
- package/options/orchestrated.schema.d.ts +37 -1
- package/options/orchestrated.schema.d.ts.map +1 -1
- package/options/public.schema.d.ts +1 -1
- package/options/public.schema.d.ts.map +1 -1
- package/options/schema.d.ts +19 -1
- package/options/schema.d.ts.map +1 -1
- package/options/shared.schemas.d.ts +10 -14
- package/options/shared.schemas.d.ts.map +1 -1
- package/options/static.schema.d.ts +1 -1
- package/options/static.schema.d.ts.map +1 -1
- package/options/transparent.schema.d.ts +1 -1
- package/options/transparent.schema.d.ts.map +1 -1
- package/package.json +21 -5
- package/people/index.d.ts +3 -0
- package/people/index.d.ts.map +1 -0
- package/people/loopback-token.auth.d.ts +75 -0
- package/people/loopback-token.auth.d.ts.map +1 -0
- package/people/people-auth.options.d.ts +36 -0
- package/people/people-auth.options.d.ts.map +1 -0
- package/session/authorization-vault.d.ts +1 -1
- package/session/authorization-vault.d.ts.map +1 -1
- package/session/encrypted-authorization-vault.d.ts +1 -1
- package/session/encrypted-authorization-vault.d.ts.map +1 -1
- package/session/secure-store.factory.d.ts.map +1 -1
- package/shared-server/index.d.ts +3 -0
- package/shared-server/index.d.ts.map +1 -0
- package/shared-server/shared-server-identity.d.ts +26 -0
- package/shared-server/shared-server-identity.d.ts.map +1 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
// libs/auth/src/index.ts
|
|
2
|
+
import { JwksService, trimSlash, normalizeIssuer, decodeJwtPayloadSafe } from "./jwks/index.mjs";
|
|
3
|
+
import {
|
|
4
|
+
CDN,
|
|
5
|
+
DEFAULT_THEME,
|
|
6
|
+
baseLayout,
|
|
7
|
+
createLayout,
|
|
8
|
+
authLayout,
|
|
9
|
+
centeredCardLayout,
|
|
10
|
+
wideLayout,
|
|
11
|
+
extraWideLayout,
|
|
12
|
+
escapeHtml,
|
|
13
|
+
BUILT_IN_AUTH_PAGE_CSP,
|
|
14
|
+
builtInAuthPageHeaders,
|
|
15
|
+
buildConsentPage,
|
|
16
|
+
buildIncrementalAuthPage,
|
|
17
|
+
buildFederatedLoginPage,
|
|
18
|
+
buildToolConsentPage,
|
|
19
|
+
buildLoginPage,
|
|
20
|
+
buildConnectPage,
|
|
21
|
+
buildConnectSuccessPage,
|
|
22
|
+
buildErrorPage,
|
|
23
|
+
renderToHtml,
|
|
24
|
+
renderLocalLoginPage,
|
|
25
|
+
toLoginExtraFields,
|
|
26
|
+
withoutSecretFieldValues
|
|
27
|
+
} from "./ui/index.mjs";
|
|
28
|
+
import {
|
|
29
|
+
InMemoryAuthorizationStore,
|
|
30
|
+
RedisAuthorizationStore,
|
|
31
|
+
StorageAuthorizationStore,
|
|
32
|
+
sealPendingLogin,
|
|
33
|
+
openPendingLogin,
|
|
34
|
+
SIGNIN_BINDING_COOKIE_PREFIX,
|
|
35
|
+
SIGNIN_BINDING_SECURE_COOKIE_PREFIX,
|
|
36
|
+
SIGNIN_BINDING_MAX_AGE_SECONDS,
|
|
37
|
+
createSigninBinding,
|
|
38
|
+
signinBindingCookieName,
|
|
39
|
+
signinBindingMatches,
|
|
40
|
+
verifyPkce,
|
|
41
|
+
generatePkceChallenge,
|
|
42
|
+
generateAuthorizationCode,
|
|
43
|
+
generateRefreshTokenValue,
|
|
44
|
+
buildCodeRecord,
|
|
45
|
+
buildPendingRecord,
|
|
46
|
+
buildRefreshTokenRecord,
|
|
47
|
+
pkceChallengeSchema,
|
|
48
|
+
authorizationCodeRecordSchema,
|
|
49
|
+
credentialTypeSchema,
|
|
50
|
+
oauthCredentialSchema,
|
|
51
|
+
apiKeyCredentialSchema,
|
|
52
|
+
basicAuthCredentialSchema,
|
|
53
|
+
bearerCredentialSchema,
|
|
54
|
+
privateKeyCredentialSchema,
|
|
55
|
+
mtlsCredentialSchema,
|
|
56
|
+
customCredentialSchema,
|
|
57
|
+
sshKeyCredentialSchema,
|
|
58
|
+
serviceAccountCredentialSchema,
|
|
59
|
+
pkceOAuthCredentialSchema,
|
|
60
|
+
credentialSchema,
|
|
61
|
+
appCredentialSchema,
|
|
62
|
+
vaultConsentRecordSchema,
|
|
63
|
+
vaultFederatedRecordSchema,
|
|
64
|
+
pendingIncrementalAuthSchema,
|
|
65
|
+
authorizationVaultEntrySchema,
|
|
66
|
+
InMemoryAuthorizationVault,
|
|
67
|
+
StorageAuthorizationVault,
|
|
68
|
+
EncryptedTypedStorage,
|
|
69
|
+
EncryptedStorageError,
|
|
70
|
+
encryptedDataSchema,
|
|
71
|
+
encryptedVaultEntrySchema,
|
|
72
|
+
VaultEncryption,
|
|
73
|
+
TokenVault,
|
|
74
|
+
StorageTokenStore,
|
|
75
|
+
TypedStorage,
|
|
76
|
+
hkdfSha256,
|
|
77
|
+
encryptValue,
|
|
78
|
+
decryptValue,
|
|
79
|
+
encryptAesGcm,
|
|
80
|
+
decryptAesGcm,
|
|
81
|
+
TinyTtlCache,
|
|
82
|
+
transportProtocolSchema,
|
|
83
|
+
sseTransportStateSchema,
|
|
84
|
+
streamableHttpTransportStateSchema,
|
|
85
|
+
statefulHttpTransportStateSchema,
|
|
86
|
+
statelessHttpTransportStateSchema,
|
|
87
|
+
legacySseTransportStateSchema,
|
|
88
|
+
transportStateSchema,
|
|
89
|
+
transportSessionSchema,
|
|
90
|
+
sessionJwtPayloadSchema,
|
|
91
|
+
encryptedBlobSchema,
|
|
92
|
+
storedSessionSchema,
|
|
93
|
+
redisConfigSchema,
|
|
94
|
+
signSession,
|
|
95
|
+
verifySession,
|
|
96
|
+
isSignedSession,
|
|
97
|
+
verifyOrParseSession,
|
|
98
|
+
SessionRateLimiter,
|
|
99
|
+
defaultSessionRateLimiter,
|
|
100
|
+
TransportIdGenerator,
|
|
101
|
+
isJwt,
|
|
102
|
+
getTokenSignatureFingerprint,
|
|
103
|
+
deriveTypedUser,
|
|
104
|
+
anonymousCallerClaims,
|
|
105
|
+
extractBearerToken,
|
|
106
|
+
getKey,
|
|
107
|
+
encryptJson,
|
|
108
|
+
decryptSessionJson,
|
|
109
|
+
safeDecrypt,
|
|
110
|
+
resetCachedKey,
|
|
111
|
+
RedisSessionStore,
|
|
112
|
+
VercelKvSessionStore,
|
|
113
|
+
InMemoryOrchestratedTokenStore,
|
|
114
|
+
StorageOrchestratedTokenStore,
|
|
115
|
+
InMemoryFederatedAuthSessionStore,
|
|
116
|
+
StorageFederatedAuthSessionStore,
|
|
117
|
+
toSessionRecord,
|
|
118
|
+
fromSessionRecord,
|
|
119
|
+
createFederatedAuthSession,
|
|
120
|
+
isSessionComplete,
|
|
121
|
+
getNextProvider,
|
|
122
|
+
completeCurrentProvider,
|
|
123
|
+
startNextProvider,
|
|
124
|
+
InMemoryConsentStore,
|
|
125
|
+
StorageConsentStore,
|
|
126
|
+
consentRecordKey,
|
|
127
|
+
createTokenStorageAdapter,
|
|
128
|
+
isRedisTokenStorage,
|
|
129
|
+
isSqliteTokenStorage,
|
|
130
|
+
isPersistentTokenStorage,
|
|
131
|
+
redisVaultEntrySchema,
|
|
132
|
+
EncryptedRedisVault,
|
|
133
|
+
createEncryptedVault,
|
|
134
|
+
toEpochSeconds,
|
|
135
|
+
isSoonExpiring,
|
|
136
|
+
isSoonExpiringProvider,
|
|
137
|
+
tryJwtExp,
|
|
138
|
+
SessionCredentialVault,
|
|
139
|
+
createSessionCredentialVault,
|
|
140
|
+
signCredentialResumeToken,
|
|
141
|
+
verifyCredentialResumeToken,
|
|
142
|
+
buildCredentialResumeUrl,
|
|
143
|
+
DEFAULT_RESUME_TTL_MS,
|
|
144
|
+
signIncrementalAuthTicket,
|
|
145
|
+
verifyIncrementalAuthTicket,
|
|
146
|
+
DEFAULT_INCREMENTAL_TICKET_TTL_MS,
|
|
147
|
+
CREDENTIALS_ACCESSOR,
|
|
148
|
+
CredentialsAccessorImpl,
|
|
149
|
+
EncryptedStorageSecureStoreBackend,
|
|
150
|
+
SECURE_STORE_ACCESSOR,
|
|
151
|
+
SecureStoreAccessorImpl,
|
|
152
|
+
createSecureStore
|
|
153
|
+
} from "./session/index.mjs";
|
|
154
|
+
import {
|
|
155
|
+
AppAuthState,
|
|
156
|
+
authModeSchema,
|
|
157
|
+
authUserSchema,
|
|
158
|
+
authorizedToolSchema,
|
|
159
|
+
authorizedPromptSchema,
|
|
160
|
+
llmSafeAuthContextSchema,
|
|
161
|
+
appAuthStateSchema,
|
|
162
|
+
appAuthorizationRecordSchema,
|
|
163
|
+
progressiveAuthStateSchema,
|
|
164
|
+
AuthorizationBase,
|
|
165
|
+
PublicAuthorization,
|
|
166
|
+
TransparentAuthorization,
|
|
167
|
+
OrchestratedAuthorization,
|
|
168
|
+
OrchestratedAuthAccessorAdapter,
|
|
169
|
+
NullOrchestratedAuthAccessor,
|
|
170
|
+
ORCHESTRATED_AUTH_ACCESSOR,
|
|
171
|
+
DcrClientRegistry
|
|
172
|
+
} from "./authorization/index.mjs";
|
|
173
|
+
import { jwkParametersSchema, jwkSchema, jsonWebKeySetSchema } from "./common/index.mjs";
|
|
174
|
+
import { aiPlatformTypeSchema, userClaimSchema, sessionIdPayloadSchema } from "./common/index.mjs";
|
|
175
|
+
import {
|
|
176
|
+
AuthInternalError,
|
|
177
|
+
EncryptionContextNotSetError,
|
|
178
|
+
VaultLoadError,
|
|
179
|
+
VaultNotFoundError,
|
|
180
|
+
TokenNotAvailableError,
|
|
181
|
+
TokenStoreRequiredError,
|
|
182
|
+
NoProviderIdError,
|
|
183
|
+
TokenLeakDetectedError,
|
|
184
|
+
JwtSecretRequiredError,
|
|
185
|
+
JwtSecretWeakError,
|
|
186
|
+
SessionSecretRequiredError,
|
|
187
|
+
CredentialProviderAlreadyRegisteredError,
|
|
188
|
+
AuthProvidersNotConfiguredError,
|
|
189
|
+
OrchestratedAuthNotAvailableError,
|
|
190
|
+
EncryptionKeyNotConfiguredError,
|
|
191
|
+
SessionIdEmptyError,
|
|
192
|
+
ElicitationSecretRequiredError,
|
|
193
|
+
ScopeDeniedError,
|
|
194
|
+
InMemoryStoreRequiredError,
|
|
195
|
+
OrchestratorJwksNotAvailableError,
|
|
196
|
+
SecureStoreConfigError,
|
|
197
|
+
AuthInvalidInputError,
|
|
198
|
+
CredentialStorageError
|
|
199
|
+
} from "./errors/index.mjs";
|
|
200
|
+
export { allowsPublicAccess, appAuthOptionsSchema, authOptionsSchema, authenticateFnSchema, consentConfigSchema, federatedAuthConfigSchema, flatRemoteProviderFields, incrementalAuthConfigSchema, isLocalMode, isOrchestratedLocal, isOrchestratedMode, isOrchestratedRemote, isPublicMode, isRemoteMode, isStaticMode, isTransparentMode, localAuthSchema, localDcrClientSchema, localDcrConfigSchema, localSigningConfigSchema, loginConfigSchema, orchestratedLocalSchema, orchestratedRemoteSchema, parseAuthOptions, providerConfigSchema, publicAccessConfigSchema, publicAuthOptionsSchema, remoteAuthSchema, remoteProviderConfigSchema, secureStoreConfigSchema, secureStoreCustomBackendSchema, secureStoreEncryptionSchema, secureStoreScopeSchema, skippedAppBehaviorSchema, staticAuthOptionsSchema, tokenRefreshConfigSchema, tokenStorageConfigSchema, tokenStorageSqliteSchema, transparentAuthOptionsSchema, upstreamProviderSchema } from "./options/index.mjs";
|
|
201
|
+
import {
|
|
202
|
+
consentToolItemSchema,
|
|
203
|
+
consentSelectionSchema,
|
|
204
|
+
consentStateSchema,
|
|
205
|
+
federatedProviderItemSchema,
|
|
206
|
+
federatedLoginStateSchema,
|
|
207
|
+
federatedSelectionSchema
|
|
208
|
+
} from "./consent/index.mjs";
|
|
209
|
+
export { appRequiresOrchestration, authProviderDetectionResultSchema, deriveProviderId, detectAuthProviders, detectedAuthProviderSchema, getProviderApps, getProviderScopes } from "./detection/index.mjs";
|
|
210
|
+
import {
|
|
211
|
+
buildWwwAuthenticate,
|
|
212
|
+
buildPrmUrl,
|
|
213
|
+
buildUnauthorizedHeader,
|
|
214
|
+
buildInvalidTokenHeader,
|
|
215
|
+
buildInsufficientScopeHeader,
|
|
216
|
+
buildInvalidRequestHeader,
|
|
217
|
+
parseWwwAuthenticate,
|
|
218
|
+
validateAudience,
|
|
219
|
+
createAudienceValidator,
|
|
220
|
+
deriveExpectedAudience,
|
|
221
|
+
AudienceValidator,
|
|
222
|
+
deriveAuthorizationId,
|
|
223
|
+
advertisedScopes,
|
|
224
|
+
DEFAULT_ALLOWED_SCOPES,
|
|
225
|
+
grantScopes,
|
|
226
|
+
resourceScopesFor,
|
|
227
|
+
scopesFromClaims,
|
|
228
|
+
isLoopbackRedirectUri
|
|
229
|
+
} from "./utils/index.mjs";
|
|
230
|
+
import {
|
|
231
|
+
credentialScopeSchema,
|
|
232
|
+
loadingStrategySchema,
|
|
233
|
+
getCredentialOptionsSchema,
|
|
234
|
+
credentialProviderConfigSchema,
|
|
235
|
+
authProviderMappingSchema,
|
|
236
|
+
authProvidersVaultOptionsSchema,
|
|
237
|
+
extractCredentialExpiry,
|
|
238
|
+
CredentialCache,
|
|
239
|
+
AUTH_PROVIDERS_ACCESSOR,
|
|
240
|
+
AuthProvidersAccessorImpl,
|
|
241
|
+
AuthProvidersRegistry,
|
|
242
|
+
AUTH_PROVIDERS_REGISTRY,
|
|
243
|
+
AuthProvidersVault,
|
|
244
|
+
AUTH_PROVIDERS_VAULT,
|
|
245
|
+
EagerCredentialLoader,
|
|
246
|
+
LazyCredentialLoader
|
|
247
|
+
} from "./vault/index.mjs";
|
|
248
|
+
import {
|
|
249
|
+
noopLogger,
|
|
250
|
+
clientMetadataDocumentSchema,
|
|
251
|
+
cimdCacheConfigSchema,
|
|
252
|
+
cimdSecurityConfigSchema,
|
|
253
|
+
cimdNetworkConfigSchema,
|
|
254
|
+
cimdConfigSchema,
|
|
255
|
+
CimdError,
|
|
256
|
+
InvalidClientIdUrlError,
|
|
257
|
+
CimdFetchError,
|
|
258
|
+
CimdValidationError,
|
|
259
|
+
CimdClientIdMismatchError,
|
|
260
|
+
CimdSecurityError,
|
|
261
|
+
RedirectUriMismatchError,
|
|
262
|
+
CimdResponseTooLargeError,
|
|
263
|
+
CimdDisabledError,
|
|
264
|
+
isCimdClientId,
|
|
265
|
+
validateClientIdUrl,
|
|
266
|
+
checkSsrfProtection,
|
|
267
|
+
hasOnlyLocalhostRedirectUris,
|
|
268
|
+
InMemoryCimdCache,
|
|
269
|
+
extractCacheHeaders,
|
|
270
|
+
parseCacheHeaders,
|
|
271
|
+
CimdService
|
|
272
|
+
} from "./cimd/index.mjs";
|
|
273
|
+
import { FrontMcpAuthContextImpl, buildAuthContext } from "./context/index.mjs";
|
|
274
|
+
export { AuthoritiesContextBuilder, AuthoritiesEngine, AuthoritiesEvaluatorRegistry, AuthoritiesProfileRegistry, AuthorityDeniedError, abacConditionSchema, abacOperatorSchema, abacPolicySchema, authoritiesClaimsMappingSchema, authoritiesConfigSchema, authoritiesMetadataSchema, authoritiesPolicySchema, findAuthoritiesProfileProblems, findAuthoritiesRuleProblems, isAnonymousSubject, rbacPermissionsPolicySchema, rbacRolesPolicySchema, rebacPolicySchema, resolveRequiredScopes, resourceIdRefSchema } from "./authorities/index.mjs";
|
|
275
|
+
import {
|
|
276
|
+
FetchCredentialMiddleware,
|
|
277
|
+
providerHeadersCredentials,
|
|
278
|
+
isFrontMcpCredentials,
|
|
279
|
+
bearerApplier,
|
|
280
|
+
basicApplier,
|
|
281
|
+
headerApplier,
|
|
282
|
+
queryApplier
|
|
283
|
+
} from "./fetch/index.mjs";
|
|
284
|
+
import { LoopbackTokenAuth, PEOPLE_SESSION_COOKIE, peopleAuthOptionsSchema, peopleSessionCookie } from "./people/index.mjs";
|
|
285
|
+
import {
|
|
286
|
+
createSharedServerNonce,
|
|
287
|
+
createSharedServerSecret,
|
|
288
|
+
deriveSharedServerKeys,
|
|
289
|
+
isSharedServerNonce,
|
|
290
|
+
proveSharedServerIdentity,
|
|
291
|
+
verifySharedServerIdentity
|
|
292
|
+
} from "./shared-server/index.mjs";
|
|
293
|
+
export {
|
|
294
|
+
AUTH_PROVIDERS_ACCESSOR,
|
|
295
|
+
AUTH_PROVIDERS_REGISTRY,
|
|
296
|
+
AUTH_PROVIDERS_VAULT,
|
|
297
|
+
AppAuthState,
|
|
298
|
+
AudienceValidator,
|
|
299
|
+
AuthInternalError,
|
|
300
|
+
AuthInvalidInputError,
|
|
301
|
+
AuthProvidersAccessorImpl,
|
|
302
|
+
AuthProvidersNotConfiguredError,
|
|
303
|
+
AuthProvidersRegistry,
|
|
304
|
+
AuthProvidersVault,
|
|
305
|
+
AuthorizationBase,
|
|
306
|
+
BUILT_IN_AUTH_PAGE_CSP,
|
|
307
|
+
CDN,
|
|
308
|
+
CREDENTIALS_ACCESSOR,
|
|
309
|
+
CimdClientIdMismatchError,
|
|
310
|
+
CimdDisabledError,
|
|
311
|
+
CimdError,
|
|
312
|
+
CimdFetchError,
|
|
313
|
+
CimdResponseTooLargeError,
|
|
314
|
+
CimdSecurityError,
|
|
315
|
+
CimdService,
|
|
316
|
+
CimdValidationError,
|
|
317
|
+
CredentialCache,
|
|
318
|
+
CredentialProviderAlreadyRegisteredError,
|
|
319
|
+
CredentialStorageError,
|
|
320
|
+
CredentialsAccessorImpl,
|
|
321
|
+
DEFAULT_ALLOWED_SCOPES,
|
|
322
|
+
DEFAULT_INCREMENTAL_TICKET_TTL_MS,
|
|
323
|
+
DEFAULT_RESUME_TTL_MS,
|
|
324
|
+
DEFAULT_THEME,
|
|
325
|
+
DcrClientRegistry,
|
|
326
|
+
EagerCredentialLoader,
|
|
327
|
+
ElicitationSecretRequiredError,
|
|
328
|
+
EncryptedRedisVault,
|
|
329
|
+
EncryptedStorageError,
|
|
330
|
+
EncryptedStorageSecureStoreBackend,
|
|
331
|
+
EncryptedTypedStorage,
|
|
332
|
+
EncryptionContextNotSetError,
|
|
333
|
+
EncryptionKeyNotConfiguredError,
|
|
334
|
+
FetchCredentialMiddleware,
|
|
335
|
+
FrontMcpAuthContextImpl,
|
|
336
|
+
InMemoryAuthorizationStore,
|
|
337
|
+
InMemoryAuthorizationVault,
|
|
338
|
+
InMemoryCimdCache,
|
|
339
|
+
InMemoryConsentStore,
|
|
340
|
+
InMemoryFederatedAuthSessionStore,
|
|
341
|
+
InMemoryOrchestratedTokenStore,
|
|
342
|
+
InMemoryStoreRequiredError,
|
|
343
|
+
InvalidClientIdUrlError,
|
|
344
|
+
JwksService,
|
|
345
|
+
JwtSecretRequiredError,
|
|
346
|
+
JwtSecretWeakError,
|
|
347
|
+
LazyCredentialLoader,
|
|
348
|
+
LoopbackTokenAuth,
|
|
349
|
+
NoProviderIdError,
|
|
350
|
+
NullOrchestratedAuthAccessor,
|
|
351
|
+
ORCHESTRATED_AUTH_ACCESSOR,
|
|
352
|
+
OrchestratedAuthAccessorAdapter,
|
|
353
|
+
OrchestratedAuthNotAvailableError,
|
|
354
|
+
OrchestratedAuthorization,
|
|
355
|
+
OrchestratorJwksNotAvailableError,
|
|
356
|
+
PEOPLE_SESSION_COOKIE,
|
|
357
|
+
PublicAuthorization,
|
|
358
|
+
RedirectUriMismatchError,
|
|
359
|
+
RedisAuthorizationStore,
|
|
360
|
+
RedisSessionStore,
|
|
361
|
+
SECURE_STORE_ACCESSOR,
|
|
362
|
+
SIGNIN_BINDING_COOKIE_PREFIX,
|
|
363
|
+
SIGNIN_BINDING_MAX_AGE_SECONDS,
|
|
364
|
+
SIGNIN_BINDING_SECURE_COOKIE_PREFIX,
|
|
365
|
+
ScopeDeniedError,
|
|
366
|
+
SecureStoreAccessorImpl,
|
|
367
|
+
SecureStoreConfigError,
|
|
368
|
+
SessionCredentialVault,
|
|
369
|
+
SessionIdEmptyError,
|
|
370
|
+
SessionRateLimiter,
|
|
371
|
+
SessionSecretRequiredError,
|
|
372
|
+
StorageAuthorizationStore,
|
|
373
|
+
StorageAuthorizationVault,
|
|
374
|
+
StorageConsentStore,
|
|
375
|
+
StorageFederatedAuthSessionStore,
|
|
376
|
+
StorageOrchestratedTokenStore,
|
|
377
|
+
StorageTokenStore,
|
|
378
|
+
TinyTtlCache,
|
|
379
|
+
TokenLeakDetectedError,
|
|
380
|
+
TokenNotAvailableError,
|
|
381
|
+
TokenStoreRequiredError,
|
|
382
|
+
TokenVault,
|
|
383
|
+
TransparentAuthorization,
|
|
384
|
+
TransportIdGenerator,
|
|
385
|
+
TypedStorage,
|
|
386
|
+
VaultEncryption,
|
|
387
|
+
VaultLoadError,
|
|
388
|
+
VaultNotFoundError,
|
|
389
|
+
VercelKvSessionStore,
|
|
390
|
+
advertisedScopes,
|
|
391
|
+
aiPlatformTypeSchema,
|
|
392
|
+
anonymousCallerClaims,
|
|
393
|
+
apiKeyCredentialSchema,
|
|
394
|
+
appAuthStateSchema,
|
|
395
|
+
appAuthorizationRecordSchema,
|
|
396
|
+
appCredentialSchema,
|
|
397
|
+
authLayout,
|
|
398
|
+
authModeSchema,
|
|
399
|
+
authProviderMappingSchema,
|
|
400
|
+
authProvidersVaultOptionsSchema,
|
|
401
|
+
authUserSchema,
|
|
402
|
+
authorizationCodeRecordSchema,
|
|
403
|
+
authorizationVaultEntrySchema,
|
|
404
|
+
authorizedPromptSchema,
|
|
405
|
+
authorizedToolSchema,
|
|
406
|
+
baseLayout,
|
|
407
|
+
basicApplier,
|
|
408
|
+
basicAuthCredentialSchema,
|
|
409
|
+
bearerApplier,
|
|
410
|
+
bearerCredentialSchema,
|
|
411
|
+
buildAuthContext,
|
|
412
|
+
buildCodeRecord,
|
|
413
|
+
buildConnectPage,
|
|
414
|
+
buildConnectSuccessPage,
|
|
415
|
+
buildConsentPage,
|
|
416
|
+
buildCredentialResumeUrl,
|
|
417
|
+
buildErrorPage,
|
|
418
|
+
buildFederatedLoginPage,
|
|
419
|
+
buildIncrementalAuthPage,
|
|
420
|
+
buildInsufficientScopeHeader,
|
|
421
|
+
buildInvalidRequestHeader,
|
|
422
|
+
buildInvalidTokenHeader,
|
|
423
|
+
buildLoginPage,
|
|
424
|
+
buildPendingRecord,
|
|
425
|
+
buildPrmUrl,
|
|
426
|
+
buildRefreshTokenRecord,
|
|
427
|
+
buildToolConsentPage,
|
|
428
|
+
buildUnauthorizedHeader,
|
|
429
|
+
buildWwwAuthenticate,
|
|
430
|
+
builtInAuthPageHeaders,
|
|
431
|
+
centeredCardLayout,
|
|
432
|
+
checkSsrfProtection,
|
|
433
|
+
cimdCacheConfigSchema,
|
|
434
|
+
cimdConfigSchema,
|
|
435
|
+
cimdNetworkConfigSchema,
|
|
436
|
+
cimdSecurityConfigSchema,
|
|
437
|
+
clientMetadataDocumentSchema,
|
|
438
|
+
completeCurrentProvider,
|
|
439
|
+
consentRecordKey,
|
|
440
|
+
consentSelectionSchema,
|
|
441
|
+
consentStateSchema,
|
|
442
|
+
consentToolItemSchema,
|
|
443
|
+
createAudienceValidator,
|
|
444
|
+
createEncryptedVault,
|
|
445
|
+
createFederatedAuthSession,
|
|
446
|
+
createLayout,
|
|
447
|
+
createSecureStore,
|
|
448
|
+
createSessionCredentialVault,
|
|
449
|
+
createSharedServerNonce,
|
|
450
|
+
createSharedServerSecret,
|
|
451
|
+
createSigninBinding,
|
|
452
|
+
createTokenStorageAdapter,
|
|
453
|
+
credentialProviderConfigSchema,
|
|
454
|
+
credentialSchema,
|
|
455
|
+
credentialScopeSchema,
|
|
456
|
+
credentialTypeSchema,
|
|
457
|
+
customCredentialSchema,
|
|
458
|
+
decodeJwtPayloadSafe,
|
|
459
|
+
decryptAesGcm,
|
|
460
|
+
decryptSessionJson,
|
|
461
|
+
decryptValue,
|
|
462
|
+
defaultSessionRateLimiter,
|
|
463
|
+
deriveAuthorizationId,
|
|
464
|
+
deriveExpectedAudience,
|
|
465
|
+
deriveSharedServerKeys,
|
|
466
|
+
deriveTypedUser,
|
|
467
|
+
encryptAesGcm,
|
|
468
|
+
encryptJson,
|
|
469
|
+
encryptValue,
|
|
470
|
+
encryptedBlobSchema,
|
|
471
|
+
encryptedDataSchema,
|
|
472
|
+
encryptedVaultEntrySchema,
|
|
473
|
+
escapeHtml,
|
|
474
|
+
extraWideLayout,
|
|
475
|
+
extractBearerToken,
|
|
476
|
+
extractCacheHeaders,
|
|
477
|
+
extractCredentialExpiry,
|
|
478
|
+
federatedLoginStateSchema,
|
|
479
|
+
federatedProviderItemSchema,
|
|
480
|
+
federatedSelectionSchema,
|
|
481
|
+
fromSessionRecord,
|
|
482
|
+
generateAuthorizationCode,
|
|
483
|
+
generatePkceChallenge,
|
|
484
|
+
generateRefreshTokenValue,
|
|
485
|
+
getCredentialOptionsSchema,
|
|
486
|
+
getKey,
|
|
487
|
+
getNextProvider,
|
|
488
|
+
getTokenSignatureFingerprint,
|
|
489
|
+
grantScopes,
|
|
490
|
+
hasOnlyLocalhostRedirectUris,
|
|
491
|
+
headerApplier,
|
|
492
|
+
hkdfSha256,
|
|
493
|
+
isCimdClientId,
|
|
494
|
+
isFrontMcpCredentials,
|
|
495
|
+
isJwt,
|
|
496
|
+
isLoopbackRedirectUri,
|
|
497
|
+
isPersistentTokenStorage,
|
|
498
|
+
isRedisTokenStorage,
|
|
499
|
+
isSessionComplete,
|
|
500
|
+
isSharedServerNonce,
|
|
501
|
+
isSignedSession,
|
|
502
|
+
isSoonExpiring,
|
|
503
|
+
isSoonExpiringProvider,
|
|
504
|
+
isSqliteTokenStorage,
|
|
505
|
+
jsonWebKeySetSchema,
|
|
506
|
+
jwkParametersSchema,
|
|
507
|
+
jwkSchema,
|
|
508
|
+
legacySseTransportStateSchema,
|
|
509
|
+
llmSafeAuthContextSchema,
|
|
510
|
+
loadingStrategySchema,
|
|
511
|
+
mtlsCredentialSchema,
|
|
512
|
+
noopLogger,
|
|
513
|
+
normalizeIssuer,
|
|
514
|
+
oauthCredentialSchema,
|
|
515
|
+
openPendingLogin,
|
|
516
|
+
parseCacheHeaders,
|
|
517
|
+
parseWwwAuthenticate,
|
|
518
|
+
pendingIncrementalAuthSchema,
|
|
519
|
+
peopleAuthOptionsSchema,
|
|
520
|
+
peopleSessionCookie,
|
|
521
|
+
pkceChallengeSchema,
|
|
522
|
+
pkceOAuthCredentialSchema,
|
|
523
|
+
privateKeyCredentialSchema,
|
|
524
|
+
progressiveAuthStateSchema,
|
|
525
|
+
proveSharedServerIdentity,
|
|
526
|
+
providerHeadersCredentials,
|
|
527
|
+
queryApplier,
|
|
528
|
+
redisConfigSchema,
|
|
529
|
+
redisVaultEntrySchema,
|
|
530
|
+
renderLocalLoginPage,
|
|
531
|
+
renderToHtml,
|
|
532
|
+
resetCachedKey,
|
|
533
|
+
resourceScopesFor,
|
|
534
|
+
safeDecrypt,
|
|
535
|
+
scopesFromClaims,
|
|
536
|
+
sealPendingLogin,
|
|
537
|
+
serviceAccountCredentialSchema,
|
|
538
|
+
sessionIdPayloadSchema,
|
|
539
|
+
sessionJwtPayloadSchema,
|
|
540
|
+
signCredentialResumeToken,
|
|
541
|
+
signIncrementalAuthTicket,
|
|
542
|
+
signSession,
|
|
543
|
+
signinBindingCookieName,
|
|
544
|
+
signinBindingMatches,
|
|
545
|
+
sseTransportStateSchema,
|
|
546
|
+
sshKeyCredentialSchema,
|
|
547
|
+
startNextProvider,
|
|
548
|
+
statefulHttpTransportStateSchema,
|
|
549
|
+
statelessHttpTransportStateSchema,
|
|
550
|
+
storedSessionSchema,
|
|
551
|
+
streamableHttpTransportStateSchema,
|
|
552
|
+
toEpochSeconds,
|
|
553
|
+
toLoginExtraFields,
|
|
554
|
+
toSessionRecord,
|
|
555
|
+
transportProtocolSchema,
|
|
556
|
+
transportSessionSchema,
|
|
557
|
+
transportStateSchema,
|
|
558
|
+
trimSlash,
|
|
559
|
+
tryJwtExp,
|
|
560
|
+
userClaimSchema,
|
|
561
|
+
validateAudience,
|
|
562
|
+
validateClientIdUrl,
|
|
563
|
+
vaultConsentRecordSchema,
|
|
564
|
+
vaultFederatedRecordSchema,
|
|
565
|
+
verifyCredentialResumeToken,
|
|
566
|
+
verifyIncrementalAuthTicket,
|
|
567
|
+
verifyOrParseSession,
|
|
568
|
+
verifyPkce,
|
|
569
|
+
verifySession,
|
|
570
|
+
verifySharedServerIdentity,
|
|
571
|
+
wideLayout,
|
|
572
|
+
withoutSecretFieldValues
|
|
573
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __frontmcpModule = typeof process !== "undefined" && typeof process.getBuiltinModule === "function" ? process.getBuiltinModule("module") : undefined;
|
|
2
|
+
const require = __frontmcpModule ? __frontmcpModule.createRequire(import.meta.url || 'file:///') : undefined;
|
|
3
|
+
// __frontmcpCreateRequire
|
|
4
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
5
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
6
|
+
}) : x)(function(x) {
|
|
7
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
8
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
// libs/auth/src/jwks/jose.loader.ts
|
|
12
|
+
var jose;
|
|
13
|
+
function loadJose() {
|
|
14
|
+
jose ??= import("jose").catch((importError) => {
|
|
15
|
+
try {
|
|
16
|
+
return __require("jose");
|
|
17
|
+
} catch {
|
|
18
|
+
throw importError;
|
|
19
|
+
}
|
|
20
|
+
}).catch((error) => {
|
|
21
|
+
jose = void 0;
|
|
22
|
+
throw error;
|
|
23
|
+
});
|
|
24
|
+
return jose;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
loadJose
|
|
28
|
+
};
|