@vibesdotdev/auth 0.0.0-stage → 1.0.0-rc.3
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/LICENSE +18 -0
- package/README.md +224 -2
- package/dist/api/auth.api-client.descriptor.d.ts +33 -0
- package/dist/api/auth.api-client.descriptor.d.ts.map +1 -0
- package/dist/api/auth.api-client.descriptor.js +34 -0
- package/dist/api/auth.api-client.descriptor.js.map +1 -0
- package/dist/api/auth.api-client.impl.d.ts +165 -0
- package/dist/api/auth.api-client.impl.d.ts.map +1 -0
- package/dist/api/auth.api-client.impl.js +595 -0
- package/dist/api/auth.api-client.impl.js.map +1 -0
- package/dist/api/auth.api-client.schemas.d.ts +199 -0
- package/dist/api/auth.api-client.schemas.d.ts.map +1 -0
- package/dist/api/auth.api-client.schemas.js +130 -0
- package/dist/api/auth.api-client.schemas.js.map +1 -0
- package/dist/api/auth.api-client.types.d.ts +142 -0
- package/dist/api/auth.api-client.types.d.ts.map +1 -0
- package/dist/api/auth.api-client.types.js +45 -0
- package/dist/api/auth.api-client.types.js.map +1 -0
- package/dist/api/auth.api-client.urls.d.ts +6 -0
- package/dist/api/auth.api-client.urls.d.ts.map +1 -0
- package/dist/api/auth.api-client.urls.js +29 -0
- package/dist/api/auth.api-client.urls.js.map +1 -0
- package/dist/api/failure-message.d.ts +11 -0
- package/dist/api/failure-message.d.ts.map +1 -0
- package/dist/api/failure-message.js +25 -0
- package/dist/api/failure-message.js.map +1 -0
- package/dist/api/index.d.ts +19 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +19 -0
- package/dist/api/index.js.map +1 -0
- package/dist/augmentations/users.descriptor.d.ts +35 -0
- package/dist/augmentations/users.descriptor.d.ts.map +1 -0
- package/dist/augmentations/users.descriptor.js +18 -0
- package/dist/augmentations/users.descriptor.js.map +1 -0
- package/dist/bearer/caller-bearer.context.descriptor.d.ts +35 -0
- package/dist/bearer/caller-bearer.context.descriptor.d.ts.map +1 -0
- package/dist/bearer/caller-bearer.context.descriptor.js +18 -0
- package/dist/bearer/caller-bearer.context.descriptor.js.map +1 -0
- package/dist/bearer/caller-bearer.context.impl.d.ts +8 -0
- package/dist/bearer/caller-bearer.context.impl.d.ts.map +1 -0
- package/dist/bearer/caller-bearer.context.impl.js +8 -0
- package/dist/bearer/caller-bearer.context.impl.js.map +1 -0
- package/dist/bearer/caller-bearer.d.ts +36 -0
- package/dist/bearer/caller-bearer.d.ts.map +1 -0
- package/dist/bearer/caller-bearer.js +71 -0
- package/dist/bearer/caller-bearer.js.map +1 -0
- package/dist/bearer/oauth-account.d.ts +37 -0
- package/dist/bearer/oauth-account.d.ts.map +1 -0
- package/dist/bearer/oauth-account.js +51 -0
- package/dist/bearer/oauth-account.js.map +1 -0
- package/dist/bearer/oauth-account.store.d.ts +8 -0
- package/dist/bearer/oauth-account.store.d.ts.map +1 -0
- package/dist/bearer/oauth-account.store.descriptor.d.ts +14 -0
- package/dist/bearer/oauth-account.store.descriptor.d.ts.map +1 -0
- package/dist/bearer/oauth-account.store.descriptor.js +13 -0
- package/dist/bearer/oauth-account.store.descriptor.js.map +1 -0
- package/dist/bearer/oauth-account.store.js +120 -0
- package/dist/bearer/oauth-account.store.js.map +1 -0
- package/dist/bearer/request-session.store.d.ts +8 -0
- package/dist/bearer/request-session.store.d.ts.map +1 -0
- package/dist/bearer/request-session.store.descriptor.d.ts +15 -0
- package/dist/bearer/request-session.store.descriptor.d.ts.map +1 -0
- package/dist/bearer/request-session.store.descriptor.js +15 -0
- package/dist/bearer/request-session.store.descriptor.js.map +1 -0
- package/dist/bearer/request-session.store.js +21 -0
- package/dist/bearer/request-session.store.js.map +1 -0
- package/dist/cli/api-key/auth.api-key.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/api-key/auth.api-key.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/api-key/auth.api-key.cli-group.descriptor.js +18 -0
- package/dist/cli/api-key/auth.api-key.cli-group.descriptor.js.map +1 -0
- package/dist/cli/api-key/create/auth.api-key-create.descriptor.d.ts +9 -0
- package/dist/cli/api-key/create/auth.api-key-create.descriptor.d.ts.map +1 -0
- package/dist/cli/api-key/create/auth.api-key-create.descriptor.js +39 -0
- package/dist/cli/api-key/create/auth.api-key-create.descriptor.js.map +1 -0
- package/dist/cli/api-key/create/auth.api-key-create.impl.d.ts +8 -0
- package/dist/cli/api-key/create/auth.api-key-create.impl.d.ts.map +1 -0
- package/dist/cli/api-key/create/auth.api-key-create.impl.js +56 -0
- package/dist/cli/api-key/create/auth.api-key-create.impl.js.map +1 -0
- package/dist/cli/api-key/list/auth.api-key-list.descriptor.d.ts +9 -0
- package/dist/cli/api-key/list/auth.api-key-list.descriptor.d.ts.map +1 -0
- package/dist/cli/api-key/list/auth.api-key-list.descriptor.js +24 -0
- package/dist/cli/api-key/list/auth.api-key-list.descriptor.js.map +1 -0
- package/dist/cli/api-key/list/auth.api-key-list.impl.d.ts +8 -0
- package/dist/cli/api-key/list/auth.api-key-list.impl.d.ts.map +1 -0
- package/dist/cli/api-key/list/auth.api-key-list.impl.js +39 -0
- package/dist/cli/api-key/list/auth.api-key-list.impl.js.map +1 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.descriptor.d.ts +9 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.descriptor.d.ts.map +1 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.descriptor.js +31 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.descriptor.js.map +1 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.impl.d.ts +8 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.impl.d.ts.map +1 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.impl.js +42 -0
- package/dist/cli/api-key/revoke/auth.api-key-revoke.impl.js.map +1 -0
- package/dist/cli/client/api.d.ts +10 -0
- package/dist/cli/client/api.d.ts.map +1 -0
- package/dist/cli/client/api.js +81 -0
- package/dist/cli/client/api.js.map +1 -0
- package/dist/cli/command-io.d.ts +31 -0
- package/dist/cli/command-io.d.ts.map +1 -0
- package/dist/cli/command-io.js +38 -0
- package/dist/cli/command-io.js.map +1 -0
- package/dist/cli/commands/login/auth.login.descriptor.d.ts +9 -0
- package/dist/cli/commands/login/auth.login.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/login/auth.login.descriptor.js +27 -0
- package/dist/cli/commands/login/auth.login.descriptor.js.map +1 -0
- package/dist/cli/commands/login/auth.login.impl.d.ts +8 -0
- package/dist/cli/commands/login/auth.login.impl.d.ts.map +1 -0
- package/dist/cli/commands/login/auth.login.impl.js +45 -0
- package/dist/cli/commands/login/auth.login.impl.js.map +1 -0
- package/dist/cli/commands/logout/auth.logout.descriptor.d.ts +9 -0
- package/dist/cli/commands/logout/auth.logout.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/logout/auth.logout.descriptor.js +17 -0
- package/dist/cli/commands/logout/auth.logout.descriptor.js.map +1 -0
- package/dist/cli/commands/logout/auth.logout.impl.d.ts +8 -0
- package/dist/cli/commands/logout/auth.logout.impl.d.ts.map +1 -0
- package/dist/cli/commands/logout/auth.logout.impl.js +27 -0
- package/dist/cli/commands/logout/auth.logout.impl.js.map +1 -0
- package/dist/cli/commands/profile/auth.profile.descriptor.d.ts +9 -0
- package/dist/cli/commands/profile/auth.profile.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/profile/auth.profile.descriptor.js +17 -0
- package/dist/cli/commands/profile/auth.profile.descriptor.js.map +1 -0
- package/dist/cli/commands/profile/auth.profile.impl.d.ts +8 -0
- package/dist/cli/commands/profile/auth.profile.impl.d.ts.map +1 -0
- package/dist/cli/commands/profile/auth.profile.impl.js +38 -0
- package/dist/cli/commands/profile/auth.profile.impl.js.map +1 -0
- package/dist/cli/commands/seed/auth.seed.descriptor.d.ts +4 -0
- package/dist/cli/commands/seed/auth.seed.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/seed/auth.seed.descriptor.js +24 -0
- package/dist/cli/commands/seed/auth.seed.descriptor.js.map +1 -0
- package/dist/cli/commands/seed/auth.seed.impl.d.ts +3 -0
- package/dist/cli/commands/seed/auth.seed.impl.d.ts.map +1 -0
- package/dist/cli/commands/seed/auth.seed.impl.js +146 -0
- package/dist/cli/commands/seed/auth.seed.impl.js.map +1 -0
- package/dist/cli/commands/seed/seed-users.d.ts +145 -0
- package/dist/cli/commands/seed/seed-users.d.ts.map +1 -0
- package/dist/cli/commands/seed/seed-users.js +64 -0
- package/dist/cli/commands/seed/seed-users.js.map +1 -0
- package/dist/cli/commands/setup/auth.setup.descriptor.d.ts +9 -0
- package/dist/cli/commands/setup/auth.setup.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/setup/auth.setup.descriptor.js +37 -0
- package/dist/cli/commands/setup/auth.setup.descriptor.js.map +1 -0
- package/dist/cli/commands/setup/auth.setup.impl.d.ts +11 -0
- package/dist/cli/commands/setup/auth.setup.impl.d.ts.map +1 -0
- package/dist/cli/commands/setup/auth.setup.impl.js +129 -0
- package/dist/cli/commands/setup/auth.setup.impl.js.map +1 -0
- package/dist/cli/commands/status/auth.status.descriptor.d.ts +9 -0
- package/dist/cli/commands/status/auth.status.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/status/auth.status.descriptor.js +23 -0
- package/dist/cli/commands/status/auth.status.descriptor.js.map +1 -0
- package/dist/cli/commands/status/auth.status.impl.d.ts +19 -0
- package/dist/cli/commands/status/auth.status.impl.d.ts.map +1 -0
- package/dist/cli/commands/status/auth.status.impl.js +128 -0
- package/dist/cli/commands/status/auth.status.impl.js.map +1 -0
- package/dist/cli/commands/token/auth.token.descriptor.d.ts +9 -0
- package/dist/cli/commands/token/auth.token.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/token/auth.token.descriptor.js +24 -0
- package/dist/cli/commands/token/auth.token.descriptor.js.map +1 -0
- package/dist/cli/commands/token/auth.token.impl.d.ts +18 -0
- package/dist/cli/commands/token/auth.token.impl.d.ts.map +1 -0
- package/dist/cli/commands/token/auth.token.impl.js +51 -0
- package/dist/cli/commands/token/auth.token.impl.js.map +1 -0
- package/dist/cli/context-bridge.d.ts +15 -0
- package/dist/cli/context-bridge.d.ts.map +1 -0
- package/dist/cli/context-bridge.js +17 -0
- package/dist/cli/context-bridge.js.map +1 -0
- package/dist/cli/groups/auth.cli-group.descriptor.d.ts +10 -0
- package/dist/cli/groups/auth.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/groups/auth.cli-group.descriptor.js +17 -0
- package/dist/cli/groups/auth.cli-group.descriptor.js.map +1 -0
- package/dist/cli/runtime/plugin/cli.d.ts +3 -0
- package/dist/cli/runtime/plugin/cli.d.ts.map +1 -0
- package/dist/cli/runtime/plugin/cli.js +95 -0
- package/dist/cli/runtime/plugin/cli.js.map +1 -0
- package/dist/cli/schemas/commands.d.ts +165 -0
- package/dist/cli/schemas/commands.d.ts.map +1 -0
- package/dist/cli/schemas/commands.js +134 -0
- package/dist/cli/schemas/commands.js.map +1 -0
- package/dist/cli/schemas/types.d.ts +108 -0
- package/dist/cli/schemas/types.d.ts.map +1 -0
- package/dist/cli/schemas/types.js +2 -0
- package/dist/cli/schemas/types.js.map +1 -0
- package/dist/cli/services/api-key.d.ts +4 -0
- package/dist/cli/services/api-key.d.ts.map +1 -0
- package/dist/cli/services/api-key.js +124 -0
- package/dist/cli/services/api-key.js.map +1 -0
- package/dist/cli/services/app-jwt.d.ts +23 -0
- package/dist/cli/services/app-jwt.d.ts.map +1 -0
- package/dist/cli/services/app-jwt.js +189 -0
- package/dist/cli/services/app-jwt.js.map +1 -0
- package/dist/cli/services/auth-probe-failure.d.ts +17 -0
- package/dist/cli/services/auth-probe-failure.d.ts.map +1 -0
- package/dist/cli/services/auth-probe-failure.js +109 -0
- package/dist/cli/services/auth-probe-failure.js.map +1 -0
- package/dist/cli/services/auth.d.ts +7 -0
- package/dist/cli/services/auth.d.ts.map +1 -0
- package/dist/cli/services/auth.js +7 -0
- package/dist/cli/services/auth.js.map +1 -0
- package/dist/cli/services/bootstrap-session.d.ts +68 -0
- package/dist/cli/services/bootstrap-session.d.ts.map +1 -0
- package/dist/cli/services/bootstrap-session.js +102 -0
- package/dist/cli/services/bootstrap-session.js.map +1 -0
- package/dist/cli/services/login-device.cli.d.ts +32 -0
- package/dist/cli/services/login-device.cli.d.ts.map +1 -0
- package/dist/cli/services/login-device.cli.js +296 -0
- package/dist/cli/services/login-device.cli.js.map +1 -0
- package/dist/cli/services/login-shared.d.ts +10 -0
- package/dist/cli/services/login-shared.d.ts.map +1 -0
- package/dist/cli/services/login-shared.js +18 -0
- package/dist/cli/services/login-shared.js.map +1 -0
- package/dist/cli/services/login.d.ts +11 -0
- package/dist/cli/services/login.d.ts.map +1 -0
- package/dist/cli/services/login.js +143 -0
- package/dist/cli/services/login.js.map +1 -0
- package/dist/cli/services/logout.d.ts +4 -0
- package/dist/cli/services/logout.d.ts.map +1 -0
- package/dist/cli/services/logout.js +101 -0
- package/dist/cli/services/logout.js.map +1 -0
- package/dist/cli/services/profile.d.ts +7 -0
- package/dist/cli/services/profile.d.ts.map +1 -0
- package/dist/cli/services/profile.js +45 -0
- package/dist/cli/services/profile.js.map +1 -0
- package/dist/cli/services/status.d.ts +7 -0
- package/dist/cli/services/status.d.ts.map +1 -0
- package/dist/cli/services/status.js +42 -0
- package/dist/cli/services/status.js.map +1 -0
- package/dist/cli/services/token.d.ts +7 -0
- package/dist/cli/services/token.d.ts.map +1 -0
- package/dist/cli/services/token.js +139 -0
- package/dist/cli/services/token.js.map +1 -0
- package/dist/client/admin.d.ts +12 -0
- package/dist/client/admin.d.ts.map +1 -0
- package/dist/client/admin.js +179 -0
- package/dist/client/admin.js.map +1 -0
- package/dist/client/app-authority.d.ts +175 -0
- package/dist/client/app-authority.d.ts.map +1 -0
- package/dist/client/app-authority.js +561 -0
- package/dist/client/app-authority.js.map +1 -0
- package/dist/client/auth-client.d.ts +21 -0
- package/dist/client/auth-client.d.ts.map +1 -0
- package/dist/client/auth-client.js +58 -0
- package/dist/client/auth-client.js.map +1 -0
- package/dist/client/auth.api-client.impl.d.ts +29 -0
- package/dist/client/auth.api-client.impl.d.ts.map +1 -0
- package/dist/client/auth.api-client.impl.js +64 -0
- package/dist/client/auth.api-client.impl.js.map +1 -0
- package/dist/client/auth.legacy-api-client.descriptor.d.ts +4 -0
- package/dist/client/auth.legacy-api-client.descriptor.d.ts.map +1 -0
- package/dist/client/auth.legacy-api-client.descriptor.js +8 -0
- package/dist/client/auth.legacy-api-client.descriptor.js.map +1 -0
- package/dist/client/browser-session-code.d.ts +32 -0
- package/dist/client/browser-session-code.d.ts.map +1 -0
- package/dist/client/browser-session-code.js +78 -0
- package/dist/client/browser-session-code.js.map +1 -0
- package/dist/client/browser-session.d.ts +9 -0
- package/dist/client/browser-session.d.ts.map +1 -0
- package/dist/client/browser-session.js +43 -0
- package/dist/client/browser-session.js.map +1 -0
- package/dist/client/consumer-context.d.ts +25 -0
- package/dist/client/consumer-context.d.ts.map +1 -0
- package/dist/client/consumer-context.js +52 -0
- package/dist/client/consumer-context.js.map +1 -0
- package/dist/client/consumer-context.types.d.ts +52 -0
- package/dist/client/consumer-context.types.d.ts.map +1 -0
- package/dist/client/consumer-context.types.js +2 -0
- package/dist/client/consumer-context.types.js.map +1 -0
- package/dist/client/device-authorization.d.ts +120 -0
- package/dist/client/device-authorization.d.ts.map +1 -0
- package/dist/client/device-authorization.js +352 -0
- package/dist/client/device-authorization.js.map +1 -0
- package/dist/client/device-login.d.ts +9 -0
- package/dist/client/device-login.d.ts.map +1 -0
- package/dist/client/device-login.js +196 -0
- package/dist/client/device-login.js.map +1 -0
- package/dist/client/factory.d.ts +18 -0
- package/dist/client/factory.d.ts.map +1 -0
- package/dist/client/factory.js +79 -0
- package/dist/client/factory.js.map +1 -0
- package/dist/client/gateway.d.ts +26 -0
- package/dist/client/gateway.d.ts.map +1 -0
- package/dist/client/gateway.js +129 -0
- package/dist/client/gateway.js.map +1 -0
- package/dist/client/index.d.ts +18 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +11 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/mobile-auth.d.ts +47 -0
- package/dist/client/mobile-auth.d.ts.map +1 -0
- package/dist/client/mobile-auth.js +137 -0
- package/dist/client/mobile-auth.js.map +1 -0
- package/dist/client/provider-compat.d.ts +24 -0
- package/dist/client/provider-compat.d.ts.map +1 -0
- package/dist/client/provider-compat.js +23 -0
- package/dist/client/provider-compat.js.map +1 -0
- package/dist/client/read-json-or-null.d.ts +23 -0
- package/dist/client/read-json-or-null.d.ts.map +1 -0
- package/dist/client/read-json-or-null.js +39 -0
- package/dist/client/read-json-or-null.js.map +1 -0
- package/dist/client/request-failure.d.ts +28 -0
- package/dist/client/request-failure.d.ts.map +1 -0
- package/dist/client/request-failure.js +80 -0
- package/dist/client/request-failure.js.map +1 -0
- package/dist/client/routes.d.ts +29 -0
- package/dist/client/routes.d.ts.map +1 -0
- package/dist/client/routes.js +29 -0
- package/dist/client/routes.js.map +1 -0
- package/dist/client/schemas.d.ts +3 -0
- package/dist/client/schemas.d.ts.map +1 -0
- package/dist/client/schemas.js +2 -0
- package/dist/client/schemas.js.map +1 -0
- package/dist/client/session-authorization.d.ts +17 -0
- package/dist/client/session-authorization.d.ts.map +1 -0
- package/dist/client/session-authorization.js +17 -0
- package/dist/client/session-authorization.js.map +1 -0
- package/dist/client/session-identity.d.ts +25 -0
- package/dist/client/session-identity.d.ts.map +1 -0
- package/dist/client/session-identity.js +29 -0
- package/dist/client/session-identity.js.map +1 -0
- package/dist/config/auth.app-credentials.config.descriptor.d.ts +10 -0
- package/dist/config/auth.app-credentials.config.descriptor.d.ts.map +1 -0
- package/dist/config/auth.app-credentials.config.descriptor.js +25 -0
- package/dist/config/auth.app-credentials.config.descriptor.js.map +1 -0
- package/dist/config/auth.providers.config.descriptor.d.ts +26 -0
- package/dist/config/auth.providers.config.descriptor.d.ts.map +1 -0
- package/dist/config/auth.providers.config.descriptor.js +51 -0
- package/dist/config/auth.providers.config.descriptor.js.map +1 -0
- package/dist/config/auth.providers.storage.descriptor.d.ts +17 -0
- package/dist/config/auth.providers.storage.descriptor.d.ts.map +1 -0
- package/dist/config/auth.providers.storage.descriptor.js +54 -0
- package/dist/config/auth.providers.storage.descriptor.js.map +1 -0
- package/dist/config/env.d.ts +6 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +6 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/local-auth-origin.d.ts +6 -0
- package/dist/config/local-auth-origin.d.ts.map +1 -0
- package/dist/config/local-auth-origin.js +33 -0
- package/dist/config/local-auth-origin.js.map +1 -0
- package/dist/device-session/auth-device-session.capability.d.ts +202 -0
- package/dist/device-session/auth-device-session.capability.d.ts.map +1 -0
- package/dist/device-session/auth-device-session.capability.js +185 -0
- package/dist/device-session/auth-device-session.capability.js.map +1 -0
- package/dist/device-session/auth-device-session.impl.consumer.worker.d.ts +58 -0
- package/dist/device-session/auth-device-session.impl.consumer.worker.d.ts.map +1 -0
- package/dist/device-session/auth-device-session.impl.consumer.worker.js +494 -0
- package/dist/device-session/auth-device-session.impl.consumer.worker.js.map +1 -0
- package/dist/device-session/device-session.state.d.ts +8 -0
- package/dist/device-session/device-session.state.d.ts.map +1 -0
- package/dist/device-session/device-session.state.js +32 -0
- package/dist/device-session/device-session.state.js.map +1 -0
- package/dist/device-session/device-session.store.d.ts +81 -0
- package/dist/device-session/device-session.store.d.ts.map +1 -0
- package/dist/device-session/device-session.store.descriptor.d.ts +27 -0
- package/dist/device-session/device-session.store.descriptor.d.ts.map +1 -0
- package/dist/device-session/device-session.store.descriptor.js +30 -0
- package/dist/device-session/device-session.store.descriptor.js.map +1 -0
- package/dist/device-session/device-session.store.js +225 -0
- package/dist/device-session/device-session.store.js.map +1 -0
- package/dist/docs/auth.docs.descriptor.d.ts +4 -0
- package/dist/docs/auth.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/auth.docs.descriptor.js +50 -0
- package/dist/docs/auth.docs.descriptor.js.map +1 -0
- package/dist/docs/auth.providers.docs.descriptor.d.ts +4 -0
- package/dist/docs/auth.providers.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/auth.providers.docs.descriptor.js +177 -0
- package/dist/docs/auth.providers.docs.descriptor.js.map +1 -0
- package/dist/docs/flows.docs.descriptor.d.ts +4 -0
- package/dist/docs/flows.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/flows.docs.descriptor.js +192 -0
- package/dist/docs/flows.docs.descriptor.js.map +1 -0
- package/dist/docs/keys.docs.descriptor.d.ts +4 -0
- package/dist/docs/keys.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/keys.docs.descriptor.js +247 -0
- package/dist/docs/keys.docs.descriptor.js.map +1 -0
- package/dist/docs/oauth.docs.descriptor.d.ts +4 -0
- package/dist/docs/oauth.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/oauth.docs.descriptor.js +177 -0
- package/dist/docs/oauth.docs.descriptor.js.map +1 -0
- package/dist/docs/sessions.docs.descriptor.d.ts +4 -0
- package/dist/docs/sessions.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/sessions.docs.descriptor.js +295 -0
- package/dist/docs/sessions.docs.descriptor.js.map +1 -0
- package/dist/events/on-client-auth-rejected.impl.d.ts +18 -0
- package/dist/events/on-client-auth-rejected.impl.d.ts.map +1 -0
- package/dist/events/on-client-auth-rejected.impl.js +23 -0
- package/dist/events/on-client-auth-rejected.impl.js.map +1 -0
- package/dist/events/on-client-auth-rejected.subscription.descriptor.d.ts +18 -0
- package/dist/events/on-client-auth-rejected.subscription.descriptor.d.ts.map +1 -0
- package/dist/events/on-client-auth-rejected.subscription.descriptor.js +18 -0
- package/dist/events/on-client-auth-rejected.subscription.descriptor.js.map +1 -0
- package/dist/events/session-established.event.descriptor.d.ts +32 -0
- package/dist/events/session-established.event.descriptor.d.ts.map +1 -0
- package/dist/events/session-established.event.descriptor.js +35 -0
- package/dist/events/session-established.event.descriptor.js.map +1 -0
- package/dist/features/authorization/organization-policy.d.ts +270 -0
- package/dist/features/authorization/organization-policy.d.ts.map +1 -0
- package/dist/features/authorization/organization-policy.js +187 -0
- package/dist/features/authorization/organization-policy.js.map +1 -0
- package/dist/features/config/auth-api.d.ts +4 -0
- package/dist/features/config/auth-api.d.ts.map +1 -0
- package/dist/features/config/auth-api.js +20 -0
- package/dist/features/config/auth-api.js.map +1 -0
- package/dist/features/config/e2e.d.ts +9 -0
- package/dist/features/config/e2e.d.ts.map +1 -0
- package/dist/features/config/e2e.js +21 -0
- package/dist/features/config/e2e.js.map +1 -0
- package/dist/features/core/shared/auth-errors.d.ts +2 -0
- package/dist/features/core/shared/auth-errors.d.ts.map +1 -0
- package/dist/features/core/shared/auth-errors.js +68 -0
- package/dist/features/core/shared/auth-errors.js.map +1 -0
- package/dist/features/email/email.config.descriptor.d.ts +4 -0
- package/dist/features/email/email.config.descriptor.d.ts.map +1 -0
- package/dist/features/email/email.config.descriptor.js +14 -0
- package/dist/features/email/email.config.descriptor.js.map +1 -0
- package/dist/features/email/env.d.ts +6 -0
- package/dist/features/email/env.d.ts.map +1 -0
- package/dist/features/email/env.js +14 -0
- package/dist/features/email/env.js.map +1 -0
- package/dist/features/email/env.schema.d.ts +50 -0
- package/dist/features/email/env.schema.d.ts.map +1 -0
- package/dist/features/email/env.schema.js +25 -0
- package/dist/features/email/env.schema.js.map +1 -0
- package/dist/features/email/provider.d.ts +8 -0
- package/dist/features/email/provider.d.ts.map +1 -0
- package/dist/features/email/provider.js +25 -0
- package/dist/features/email/provider.js.map +1 -0
- package/dist/features/email/resolver.d.ts +48 -0
- package/dist/features/email/resolver.d.ts.map +1 -0
- package/dist/features/email/resolver.js +54 -0
- package/dist/features/email/resolver.js.map +1 -0
- package/dist/features/email/schemas/common.d.ts +146 -0
- package/dist/features/email/schemas/common.d.ts.map +1 -0
- package/dist/features/email/schemas/common.js +109 -0
- package/dist/features/email/schemas/common.js.map +1 -0
- package/dist/features/email/schemas/forms.d.ts +72 -0
- package/dist/features/email/schemas/forms.d.ts.map +1 -0
- package/dist/features/email/schemas/forms.js +62 -0
- package/dist/features/email/schemas/forms.js.map +1 -0
- package/dist/features/email/schemas/index.d.ts +10 -0
- package/dist/features/email/schemas/index.d.ts.map +1 -0
- package/dist/features/email/schemas/index.js +5 -0
- package/dist/features/email/schemas/index.js.map +1 -0
- package/dist/features/email/schemas/templates.d.ts +40 -0
- package/dist/features/email/schemas/templates.d.ts.map +1 -0
- package/dist/features/email/schemas/templates.js +2 -0
- package/dist/features/email/schemas/templates.js.map +1 -0
- package/dist/features/email/schemas/transport.d.ts +83 -0
- package/dist/features/email/schemas/transport.d.ts.map +1 -0
- package/dist/features/email/schemas/transport.js +38 -0
- package/dist/features/email/schemas/transport.js.map +1 -0
- package/dist/features/email/schemas/types.d.ts +2 -0
- package/dist/features/email/schemas/types.d.ts.map +1 -0
- package/dist/features/email/schemas/types.js +2 -0
- package/dist/features/email/schemas/types.js.map +1 -0
- package/dist/features/email/send.d.ts +50 -0
- package/dist/features/email/send.d.ts.map +1 -0
- package/dist/features/email/send.js +73 -0
- package/dist/features/email/send.js.map +1 -0
- package/dist/features/oauth/schemas/common.d.ts +75 -0
- package/dist/features/oauth/schemas/common.d.ts.map +1 -0
- package/dist/features/oauth/schemas/common.js +51 -0
- package/dist/features/oauth/schemas/common.js.map +1 -0
- package/dist/features/oauth/schemas/forms.d.ts +29 -0
- package/dist/features/oauth/schemas/forms.d.ts.map +1 -0
- package/dist/features/oauth/schemas/forms.js +17 -0
- package/dist/features/oauth/schemas/forms.js.map +1 -0
- package/dist/features/oauth/schemas/index.d.ts +7 -0
- package/dist/features/oauth/schemas/index.d.ts.map +1 -0
- package/dist/features/oauth/schemas/index.js +4 -0
- package/dist/features/oauth/schemas/index.js.map +1 -0
- package/dist/features/oauth/schemas/types.d.ts +2 -0
- package/dist/features/oauth/schemas/types.d.ts.map +1 -0
- package/dist/features/oauth/schemas/types.js +2 -0
- package/dist/features/oauth/schemas/types.js.map +1 -0
- package/dist/features/oauth/schemas/ui.d.ts +28 -0
- package/dist/features/oauth/schemas/ui.d.ts.map +1 -0
- package/dist/features/oauth/schemas/ui.js +10 -0
- package/dist/features/oauth/schemas/ui.js.map +1 -0
- package/dist/features/permissions/definitions/ai.d.ts +4 -0
- package/dist/features/permissions/definitions/ai.d.ts.map +1 -0
- package/dist/features/permissions/definitions/ai.js +195 -0
- package/dist/features/permissions/definitions/ai.js.map +1 -0
- package/dist/features/permissions/definitions/billing.d.ts +2 -0
- package/dist/features/permissions/definitions/billing.d.ts.map +1 -0
- package/dist/features/permissions/definitions/billing.js +2 -0
- package/dist/features/permissions/definitions/billing.js.map +1 -0
- package/dist/features/permissions/definitions/catalog.d.ts +11 -0
- package/dist/features/permissions/definitions/catalog.d.ts.map +1 -0
- package/dist/features/permissions/definitions/catalog.js +13 -0
- package/dist/features/permissions/definitions/catalog.js.map +1 -0
- package/dist/features/permissions/definitions/collaboration.d.ts +3 -0
- package/dist/features/permissions/definitions/collaboration.d.ts.map +1 -0
- package/dist/features/permissions/definitions/collaboration.js +66 -0
- package/dist/features/permissions/definitions/collaboration.js.map +1 -0
- package/dist/features/permissions/definitions/helpers.d.ts +14 -0
- package/dist/features/permissions/definitions/helpers.d.ts.map +1 -0
- package/dist/features/permissions/definitions/helpers.js +42 -0
- package/dist/features/permissions/definitions/helpers.js.map +1 -0
- package/dist/features/permissions/definitions/index.d.ts +9 -0
- package/dist/features/permissions/definitions/index.d.ts.map +1 -0
- package/dist/features/permissions/definitions/index.js +8 -0
- package/dist/features/permissions/definitions/index.js.map +1 -0
- package/dist/features/permissions/definitions/repository.d.ts +23 -0
- package/dist/features/permissions/definitions/repository.d.ts.map +1 -0
- package/dist/features/permissions/definitions/repository.js +34 -0
- package/dist/features/permissions/definitions/repository.js.map +1 -0
- package/dist/features/permissions/definitions/roles.d.ts +13 -0
- package/dist/features/permissions/definitions/roles.d.ts.map +1 -0
- package/dist/features/permissions/definitions/roles.js +176 -0
- package/dist/features/permissions/definitions/roles.js.map +1 -0
- package/dist/features/permissions/definitions/system.d.ts +3 -0
- package/dist/features/permissions/definitions/system.d.ts.map +1 -0
- package/dist/features/permissions/definitions/system.js +157 -0
- package/dist/features/permissions/definitions/system.js.map +1 -0
- package/dist/features/permissions/schemas/common.d.ts +110 -0
- package/dist/features/permissions/schemas/common.d.ts.map +1 -0
- package/dist/features/permissions/schemas/common.js +89 -0
- package/dist/features/permissions/schemas/common.js.map +1 -0
- package/dist/features/permissions/schemas/forms.d.ts +46 -0
- package/dist/features/permissions/schemas/forms.d.ts.map +1 -0
- package/dist/features/permissions/schemas/forms.js +42 -0
- package/dist/features/permissions/schemas/forms.js.map +1 -0
- package/dist/features/permissions/schemas/guards.d.ts +56 -0
- package/dist/features/permissions/schemas/guards.d.ts.map +1 -0
- package/dist/features/permissions/schemas/guards.js +2 -0
- package/dist/features/permissions/schemas/guards.js.map +1 -0
- package/dist/features/permissions/schemas/index.d.ts +10 -0
- package/dist/features/permissions/schemas/index.d.ts.map +1 -0
- package/dist/features/permissions/schemas/index.js +5 -0
- package/dist/features/permissions/schemas/index.js.map +1 -0
- package/dist/features/permissions/schemas/server.d.ts +128 -0
- package/dist/features/permissions/schemas/server.d.ts.map +1 -0
- package/dist/features/permissions/schemas/server.js +91 -0
- package/dist/features/permissions/schemas/server.js.map +1 -0
- package/dist/features/permissions/schemas/types.d.ts +3 -0
- package/dist/features/permissions/schemas/types.d.ts.map +1 -0
- package/dist/features/permissions/schemas/types.js +5 -0
- package/dist/features/permissions/schemas/types.js.map +1 -0
- package/dist/features/permissions/schemas/ui.d.ts +50 -0
- package/dist/features/permissions/schemas/ui.d.ts.map +1 -0
- package/dist/features/permissions/schemas/ui.js +27 -0
- package/dist/features/permissions/schemas/ui.js.map +1 -0
- package/dist/features/services/credential-custody.d.ts +12 -0
- package/dist/features/services/credential-custody.d.ts.map +1 -0
- package/dist/features/services/credential-custody.js +76 -0
- package/dist/features/services/credential-custody.js.map +1 -0
- package/dist/features/services/credential-store.d.ts +116 -0
- package/dist/features/services/credential-store.d.ts.map +1 -0
- package/dist/features/services/credential-store.js +476 -0
- package/dist/features/services/credential-store.js.map +1 -0
- package/dist/features/utils/attempt.d.ts +29 -0
- package/dist/features/utils/attempt.d.ts.map +1 -0
- package/dist/features/utils/attempt.js +43 -0
- package/dist/features/utils/attempt.js.map +1 -0
- package/dist/features/utils/qr-code.d.ts +17 -0
- package/dist/features/utils/qr-code.d.ts.map +1 -0
- package/dist/features/utils/qr-code.js +68 -0
- package/dist/features/utils/qr-code.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/json.d.ts +11 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +19 -0
- package/dist/json.js.map +1 -0
- package/dist/jwt/index.d.ts +51 -0
- package/dist/jwt/index.d.ts.map +1 -0
- package/dist/jwt/index.js +47 -0
- package/dist/jwt/index.js.map +1 -0
- package/dist/jwt/local-jwks-origin.d.ts +3 -0
- package/dist/jwt/local-jwks-origin.d.ts.map +1 -0
- package/dist/jwt/local-jwks-origin.js +6 -0
- package/dist/jwt/local-jwks-origin.js.map +1 -0
- package/dist/keys/attempt.d.ts +19 -0
- package/dist/keys/attempt.d.ts.map +1 -0
- package/dist/keys/attempt.js +26 -0
- package/dist/keys/attempt.js.map +1 -0
- package/dist/keys/device-keys.d.ts +24 -0
- package/dist/keys/device-keys.d.ts.map +1 -0
- package/dist/keys/device-keys.js +40 -0
- package/dist/keys/device-keys.js.map +1 -0
- package/dist/keys/did-key.d.ts +45 -0
- package/dist/keys/did-key.d.ts.map +1 -0
- package/dist/keys/did-key.js +198 -0
- package/dist/keys/did-key.js.map +1 -0
- package/dist/keys/ed25519-strict.d.ts +27 -0
- package/dist/keys/ed25519-strict.d.ts.map +1 -0
- package/dist/keys/ed25519-strict.js +147 -0
- package/dist/keys/ed25519-strict.js.map +1 -0
- package/dist/keys/envelope-versions.d.ts +8 -0
- package/dist/keys/envelope-versions.d.ts.map +1 -0
- package/dist/keys/envelope-versions.js +8 -0
- package/dist/keys/envelope-versions.js.map +1 -0
- package/dist/keys/errors.d.ts +56 -0
- package/dist/keys/errors.d.ts.map +1 -0
- package/dist/keys/errors.js +88 -0
- package/dist/keys/errors.js.map +1 -0
- package/dist/keys/index.d.ts +13 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +13 -0
- package/dist/keys/index.js.map +1 -0
- package/dist/keys/jws.d.ts +25 -0
- package/dist/keys/jws.d.ts.map +1 -0
- package/dist/keys/jws.js +102 -0
- package/dist/keys/jws.js.map +1 -0
- package/dist/keys/key-envelope.d.ts +85 -0
- package/dist/keys/key-envelope.d.ts.map +1 -0
- package/dist/keys/key-envelope.js +189 -0
- package/dist/keys/key-envelope.js.map +1 -0
- package/dist/keys/recipient-key-bundle.d.ts +70 -0
- package/dist/keys/recipient-key-bundle.d.ts.map +1 -0
- package/dist/keys/recipient-key-bundle.js +143 -0
- package/dist/keys/recipient-key-bundle.js.map +1 -0
- package/dist/keys/replay-guard.d.ts +39 -0
- package/dist/keys/replay-guard.d.ts.map +1 -0
- package/dist/keys/replay-guard.js +15 -0
- package/dist/keys/replay-guard.js.map +1 -0
- package/dist/providers/builtin/index.d.ts +7 -0
- package/dist/providers/builtin/index.d.ts.map +1 -0
- package/dist/providers/builtin/index.js +7 -0
- package/dist/providers/builtin/index.js.map +1 -0
- package/dist/providers/builtin/known-providers.d.ts +239 -0
- package/dist/providers/builtin/known-providers.d.ts.map +1 -0
- package/dist/providers/builtin/known-providers.js +243 -0
- package/dist/providers/builtin/known-providers.js.map +1 -0
- package/dist/qrcode-wrapper.d.ts +3 -0
- package/dist/qrcode-wrapper.d.ts.map +1 -0
- package/dist/qrcode-wrapper.js +3 -0
- package/dist/qrcode-wrapper.js.map +1 -0
- package/dist/resolvers/auth-provider.resolver.descriptor.d.ts +40 -0
- package/dist/resolvers/auth-provider.resolver.descriptor.d.ts.map +1 -0
- package/dist/resolvers/auth-provider.resolver.descriptor.js +26 -0
- package/dist/resolvers/auth-provider.resolver.descriptor.js.map +1 -0
- package/dist/resolvers/auth-provider.resolver.impl.d.ts +108 -0
- package/dist/resolvers/auth-provider.resolver.impl.d.ts.map +1 -0
- package/dist/resolvers/auth-provider.resolver.impl.js +123 -0
- package/dist/resolvers/auth-provider.resolver.impl.js.map +1 -0
- package/dist/runtime/auth.browser.plugin.d.ts +3 -0
- package/dist/runtime/auth.browser.plugin.d.ts.map +1 -0
- package/dist/runtime/auth.browser.plugin.js +19 -0
- package/dist/runtime/auth.browser.plugin.js.map +1 -0
- package/dist/runtime/auth.config.descriptor.d.ts +22 -0
- package/dist/runtime/auth.config.descriptor.d.ts.map +1 -0
- package/dist/runtime/auth.config.descriptor.js +83 -0
- package/dist/runtime/auth.config.descriptor.js.map +1 -0
- package/dist/runtime/auth.consumer.plugin.d.ts +3 -0
- package/dist/runtime/auth.consumer.plugin.d.ts.map +1 -0
- package/dist/runtime/auth.consumer.plugin.js +42 -0
- package/dist/runtime/auth.consumer.plugin.js.map +1 -0
- package/dist/runtime/auth.context.descriptor.d.ts +38 -0
- package/dist/runtime/auth.context.descriptor.d.ts.map +1 -0
- package/dist/runtime/auth.context.descriptor.js +12 -0
- package/dist/runtime/auth.context.descriptor.js.map +1 -0
- package/dist/runtime/auth.context.impl.d.ts +10 -0
- package/dist/runtime/auth.context.impl.d.ts.map +1 -0
- package/dist/runtime/auth.context.impl.js +11 -0
- package/dist/runtime/auth.context.impl.js.map +1 -0
- package/dist/runtime/auth.identity.descriptor.d.ts +30 -0
- package/dist/runtime/auth.identity.descriptor.d.ts.map +1 -0
- package/dist/runtime/auth.identity.descriptor.js +20 -0
- package/dist/runtime/auth.identity.descriptor.js.map +1 -0
- package/dist/runtime/auth.identity.impl.d.ts +16 -0
- package/dist/runtime/auth.identity.impl.d.ts.map +1 -0
- package/dist/runtime/auth.identity.impl.js +111 -0
- package/dist/runtime/auth.identity.impl.js.map +1 -0
- package/dist/runtime/auth.plugin.d.ts +3 -0
- package/dist/runtime/auth.plugin.d.ts.map +1 -0
- package/dist/runtime/auth.plugin.js +58 -0
- package/dist/runtime/auth.plugin.js.map +1 -0
- package/dist/runtime/auto-verify.config.descriptor.d.ts +18 -0
- package/dist/runtime/auto-verify.config.descriptor.d.ts.map +1 -0
- package/dist/runtime/auto-verify.config.descriptor.js +79 -0
- package/dist/runtime/auto-verify.config.descriptor.js.map +1 -0
- package/dist/runtime/consumer-auth.context.descriptor.d.ts +30 -0
- package/dist/runtime/consumer-auth.context.descriptor.d.ts.map +1 -0
- package/dist/runtime/consumer-auth.context.descriptor.js +6 -0
- package/dist/runtime/consumer-auth.context.descriptor.js.map +1 -0
- package/dist/runtime/consumer-auth.impl.consumer.d.ts +7 -0
- package/dist/runtime/consumer-auth.impl.consumer.d.ts.map +1 -0
- package/dist/runtime/consumer-auth.impl.consumer.js +51 -0
- package/dist/runtime/consumer-auth.impl.consumer.js.map +1 -0
- package/dist/runtime/kinds/account-linking.kind.d.ts +28 -0
- package/dist/runtime/kinds/account-linking.kind.d.ts.map +1 -0
- package/dist/runtime/kinds/account-linking.kind.js +12 -0
- package/dist/runtime/kinds/account-linking.kind.js.map +1 -0
- package/dist/runtime/kinds/index.d.ts +9 -0
- package/dist/runtime/kinds/index.d.ts.map +1 -0
- package/dist/runtime/kinds/index.js +8 -0
- package/dist/runtime/kinds/index.js.map +1 -0
- package/dist/runtime/kinds/provider.api.impl.consumer.d.ts +7 -0
- package/dist/runtime/kinds/provider.api.impl.consumer.d.ts.map +1 -0
- package/dist/runtime/kinds/provider.api.impl.consumer.js +37 -0
- package/dist/runtime/kinds/provider.api.impl.consumer.js.map +1 -0
- package/dist/runtime/kinds/provider.default.api.d.ts +4 -0
- package/dist/runtime/kinds/provider.default.api.d.ts.map +1 -0
- package/dist/runtime/kinds/provider.default.api.js +56 -0
- package/dist/runtime/kinds/provider.default.api.js.map +1 -0
- package/dist/runtime/kinds/provider.default.config.d.ts +17 -0
- package/dist/runtime/kinds/provider.default.config.d.ts.map +1 -0
- package/dist/runtime/kinds/provider.default.config.js +103 -0
- package/dist/runtime/kinds/provider.default.config.js.map +1 -0
- package/dist/runtime/kinds/provider.default.d.ts +30 -0
- package/dist/runtime/kinds/provider.default.d.ts.map +1 -0
- package/dist/runtime/kinds/provider.default.js +76 -0
- package/dist/runtime/kinds/provider.default.js.map +1 -0
- package/dist/runtime/kinds/provider.kind.d.ts +20 -0
- package/dist/runtime/kinds/provider.kind.d.ts.map +1 -0
- package/dist/runtime/kinds/provider.kind.js +96 -0
- package/dist/runtime/kinds/provider.kind.js.map +1 -0
- package/dist/runtime/logging/auth.logger.descriptor.d.ts +9 -0
- package/dist/runtime/logging/auth.logger.descriptor.d.ts.map +1 -0
- package/dist/runtime/logging/auth.logger.descriptor.js +18 -0
- package/dist/runtime/logging/auth.logger.descriptor.js.map +1 -0
- package/dist/runtime/logging/auth.output.descriptor.d.ts +7 -0
- package/dist/runtime/logging/auth.output.descriptor.d.ts.map +1 -0
- package/dist/runtime/logging/auth.output.descriptor.js +17 -0
- package/dist/runtime/logging/auth.output.descriptor.js.map +1 -0
- package/dist/runtime/plugin/account-linking.d.ts +3 -0
- package/dist/runtime/plugin/account-linking.d.ts.map +1 -0
- package/dist/runtime/plugin/account-linking.js +30 -0
- package/dist/runtime/plugin/account-linking.js.map +1 -0
- package/dist/runtime/plugin/api-client.d.ts +19 -0
- package/dist/runtime/plugin/api-client.d.ts.map +1 -0
- package/dist/runtime/plugin/api-client.js +59 -0
- package/dist/runtime/plugin/api-client.js.map +1 -0
- package/dist/runtime/plugin/core.provider.d.ts +3 -0
- package/dist/runtime/plugin/core.provider.d.ts.map +1 -0
- package/dist/runtime/plugin/core.provider.js +38 -0
- package/dist/runtime/plugin/core.provider.js.map +1 -0
- package/dist/runtime/plugin/identity.d.ts +3 -0
- package/dist/runtime/plugin/identity.d.ts.map +1 -0
- package/dist/runtime/plugin/identity.js +14 -0
- package/dist/runtime/plugin/identity.js.map +1 -0
- package/dist/runtime/plugin/index.d.ts +5 -0
- package/dist/runtime/plugin/index.d.ts.map +1 -0
- package/dist/runtime/plugin/index.js +5 -0
- package/dist/runtime/plugin/index.js.map +1 -0
- package/dist/runtime/plugin/support.d.ts +3 -0
- package/dist/runtime/plugin/support.d.ts.map +1 -0
- package/dist/runtime/plugin/support.js +10 -0
- package/dist/runtime/plugin/support.js.map +1 -0
- package/dist/runtime/providers/auth-provider.api.descriptor.d.ts +10 -0
- package/dist/runtime/providers/auth-provider.api.descriptor.d.ts.map +1 -0
- package/dist/runtime/providers/auth-provider.api.descriptor.js +24 -0
- package/dist/runtime/providers/auth-provider.api.descriptor.js.map +1 -0
- package/dist/runtime/providers/db.descriptor.d.ts +11 -0
- package/dist/runtime/providers/db.descriptor.d.ts.map +1 -0
- package/dist/runtime/providers/db.descriptor.js +26 -0
- package/dist/runtime/providers/db.descriptor.js.map +1 -0
- package/dist/schemas/account-linking.d.ts +82 -0
- package/dist/schemas/account-linking.d.ts.map +1 -0
- package/dist/schemas/account-linking.js +49 -0
- package/dist/schemas/account-linking.js.map +1 -0
- package/dist/schemas/admin/index.d.ts +253 -0
- package/dist/schemas/admin/index.d.ts.map +1 -0
- package/dist/schemas/admin/index.js +2 -0
- package/dist/schemas/admin/index.js.map +1 -0
- package/dist/schemas/admin/responses.d.ts +298 -0
- package/dist/schemas/admin/responses.d.ts.map +1 -0
- package/dist/schemas/admin/responses.js +189 -0
- package/dist/schemas/admin/responses.js.map +1 -0
- package/dist/schemas/agents.d.ts +337 -0
- package/dist/schemas/agents.d.ts.map +1 -0
- package/dist/schemas/agents.js +164 -0
- package/dist/schemas/agents.js.map +1 -0
- package/dist/schemas/api/api-keys.d.ts +74 -0
- package/dist/schemas/api/api-keys.d.ts.map +1 -0
- package/dist/schemas/api/api-keys.js +70 -0
- package/dist/schemas/api/api-keys.js.map +1 -0
- package/dist/schemas/api/client.d.ts +220 -0
- package/dist/schemas/api/client.d.ts.map +1 -0
- package/dist/schemas/api/client.js +95 -0
- package/dist/schemas/api/client.js.map +1 -0
- package/dist/schemas/api/provider.d.ts +85 -0
- package/dist/schemas/api/provider.d.ts.map +1 -0
- package/dist/schemas/api/provider.js +42 -0
- package/dist/schemas/api/provider.js.map +1 -0
- package/dist/schemas/app-credentials.d.ts +44 -0
- package/dist/schemas/app-credentials.d.ts.map +1 -0
- package/dist/schemas/app-credentials.js +36 -0
- package/dist/schemas/app-credentials.js.map +1 -0
- package/dist/schemas/app-jwt.d.ts +112 -0
- package/dist/schemas/app-jwt.d.ts.map +1 -0
- package/dist/schemas/app-jwt.js +14 -0
- package/dist/schemas/app-jwt.js.map +1 -0
- package/dist/schemas/auth/better-auth.d.ts +11 -0
- package/dist/schemas/auth/better-auth.d.ts.map +1 -0
- package/dist/schemas/auth/better-auth.js +2 -0
- package/dist/schemas/auth/better-auth.js.map +1 -0
- package/dist/schemas/auth/capabilities.d.ts +42 -0
- package/dist/schemas/auth/capabilities.d.ts.map +1 -0
- package/dist/schemas/auth/capabilities.js +16 -0
- package/dist/schemas/auth/capabilities.js.map +1 -0
- package/dist/schemas/auth/common.d.ts +158 -0
- package/dist/schemas/auth/common.d.ts.map +1 -0
- package/dist/schemas/auth/common.js +118 -0
- package/dist/schemas/auth/common.js.map +1 -0
- package/dist/schemas/auth/services.d.ts +23 -0
- package/dist/schemas/auth/services.d.ts.map +1 -0
- package/dist/schemas/auth/services.js +2 -0
- package/dist/schemas/auth/services.js.map +1 -0
- package/dist/schemas/auth/stores.d.ts +128 -0
- package/dist/schemas/auth/stores.d.ts.map +1 -0
- package/dist/schemas/auth/stores.js +73 -0
- package/dist/schemas/auth/stores.js.map +1 -0
- package/dist/schemas/auth/types.d.ts +3 -0
- package/dist/schemas/auth/types.d.ts.map +1 -0
- package/dist/schemas/auth/types.js +5 -0
- package/dist/schemas/auth/types.js.map +1 -0
- package/dist/schemas/auth/ui.d.ts +168 -0
- package/dist/schemas/auth/ui.d.ts.map +1 -0
- package/dist/schemas/auth/ui.js +112 -0
- package/dist/schemas/auth/ui.js.map +1 -0
- package/dist/schemas/auth-provider.d.ts +170 -0
- package/dist/schemas/auth-provider.d.ts.map +1 -0
- package/dist/schemas/auth-provider.js +137 -0
- package/dist/schemas/auth-provider.js.map +1 -0
- package/dist/schemas/authority-state.d.ts +42 -0
- package/dist/schemas/authority-state.d.ts.map +1 -0
- package/dist/schemas/authority-state.js +15 -0
- package/dist/schemas/authority-state.js.map +1 -0
- package/dist/schemas/browser-session-code.d.ts +49 -0
- package/dist/schemas/browser-session-code.d.ts.map +1 -0
- package/dist/schemas/browser-session-code.js +49 -0
- package/dist/schemas/browser-session-code.js.map +1 -0
- package/dist/schemas/consumer-auth.d.ts +95 -0
- package/dist/schemas/consumer-auth.d.ts.map +1 -0
- package/dist/schemas/consumer-auth.js +46 -0
- package/dist/schemas/consumer-auth.js.map +1 -0
- package/dist/schemas/credentials.d.ts +172 -0
- package/dist/schemas/credentials.d.ts.map +1 -0
- package/dist/schemas/credentials.js +105 -0
- package/dist/schemas/credentials.js.map +1 -0
- package/dist/schemas/flows/forms.d.ts +91 -0
- package/dist/schemas/flows/forms.d.ts.map +1 -0
- package/dist/schemas/flows/forms.js +133 -0
- package/dist/schemas/flows/forms.js.map +1 -0
- package/dist/schemas/flows/phone.d.ts +84 -0
- package/dist/schemas/flows/phone.d.ts.map +1 -0
- package/dist/schemas/flows/phone.js +90 -0
- package/dist/schemas/flows/phone.js.map +1 -0
- package/dist/schemas/identity.d.ts +14 -0
- package/dist/schemas/identity.d.ts.map +1 -0
- package/dist/schemas/identity.js +13 -0
- package/dist/schemas/identity.js.map +1 -0
- package/dist/schemas/index.d.ts +27 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +14 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/mobile-auth.d.ts +58 -0
- package/dist/schemas/mobile-auth.d.ts.map +1 -0
- package/dist/schemas/mobile-auth.js +25 -0
- package/dist/schemas/mobile-auth.js.map +1 -0
- package/dist/schemas/mobile.config.descriptor.d.ts +10 -0
- package/dist/schemas/mobile.config.descriptor.d.ts.map +1 -0
- package/dist/schemas/mobile.config.descriptor.js +61 -0
- package/dist/schemas/mobile.config.descriptor.js.map +1 -0
- package/dist/schemas/provider.d.ts +3 -0
- package/dist/schemas/provider.d.ts.map +1 -0
- package/dist/schemas/provider.js +2 -0
- package/dist/schemas/provider.js.map +1 -0
- package/dist/schemas/registered-app.d.ts +86 -0
- package/dist/schemas/registered-app.d.ts.map +1 -0
- package/dist/schemas/registered-app.js +68 -0
- package/dist/schemas/registered-app.js.map +1 -0
- package/dist/schemas/session-verification.d.ts +87 -0
- package/dist/schemas/session-verification.d.ts.map +1 -0
- package/dist/schemas/session-verification.js +49 -0
- package/dist/schemas/session-verification.js.map +1 -0
- package/dist/schemas/tui-actions.d.ts +17 -0
- package/dist/schemas/tui-actions.d.ts.map +1 -0
- package/dist/schemas/tui-actions.js +7 -0
- package/dist/schemas/tui-actions.js.map +1 -0
- package/dist/schemas/types.d.ts +3 -0
- package/dist/schemas/types.d.ts.map +1 -0
- package/dist/schemas/types.js +2 -0
- package/dist/schemas/types.js.map +1 -0
- package/dist/schemas/ui.d.ts +5 -0
- package/dist/schemas/ui.d.ts.map +1 -0
- package/dist/schemas/ui.js +3 -0
- package/dist/schemas/ui.js.map +1 -0
- package/dist/server/auth-service-binding.d.ts +11 -0
- package/dist/server/auth-service-binding.d.ts.map +1 -0
- package/dist/server/auth-service-binding.js +8 -0
- package/dist/server/auth-service-binding.js.map +1 -0
- package/dist/server/bound-session-verifier.descriptor.d.ts +7 -0
- package/dist/server/bound-session-verifier.descriptor.d.ts.map +1 -0
- package/dist/server/bound-session-verifier.descriptor.js +5 -0
- package/dist/server/bound-session-verifier.descriptor.js.map +1 -0
- package/dist/server/bound-session-verifier.impl.d.ts +7 -0
- package/dist/server/bound-session-verifier.impl.d.ts.map +1 -0
- package/dist/server/bound-session-verifier.impl.js +11 -0
- package/dist/server/bound-session-verifier.impl.js.map +1 -0
- package/dist/server/browser-session-code-handoff.d.ts +33 -0
- package/dist/server/browser-session-code-handoff.d.ts.map +1 -0
- package/dist/server/browser-session-code-handoff.js +87 -0
- package/dist/server/browser-session-code-handoff.js.map +1 -0
- package/dist/server/consumer-session-user.d.ts +11 -0
- package/dist/server/consumer-session-user.d.ts.map +1 -0
- package/dist/server/consumer-session-user.js +23 -0
- package/dist/server/consumer-session-user.js.map +1 -0
- package/dist/server/cookie-domain.d.ts +8 -0
- package/dist/server/cookie-domain.d.ts.map +1 -0
- package/dist/server/cookie-domain.js +25 -0
- package/dist/server/cookie-domain.js.map +1 -0
- package/dist/server/issuer-session-verifier.impl.d.ts +23 -0
- package/dist/server/issuer-session-verifier.impl.d.ts.map +1 -0
- package/dist/server/issuer-session-verifier.impl.js +38 -0
- package/dist/server/issuer-session-verifier.impl.js.map +1 -0
- package/dist/server/issuer-session-verifier.plugin.d.ts +3 -0
- package/dist/server/issuer-session-verifier.plugin.d.ts.map +1 -0
- package/dist/server/issuer-session-verifier.plugin.js +8 -0
- package/dist/server/issuer-session-verifier.plugin.js.map +1 -0
- package/dist/server/jwks-response-cache.d.ts +50 -0
- package/dist/server/jwks-response-cache.d.ts.map +1 -0
- package/dist/server/jwks-response-cache.js +207 -0
- package/dist/server/jwks-response-cache.js.map +1 -0
- package/dist/server/jwt-session-handle.d.ts +113 -0
- package/dist/server/jwt-session-handle.d.ts.map +1 -0
- package/dist/server/jwt-session-handle.js +1184 -0
- package/dist/server/jwt-session-handle.js.map +1 -0
- package/dist/server/registered-origin-resolver.d.ts +25 -0
- package/dist/server/registered-origin-resolver.d.ts.map +1 -0
- package/dist/server/registered-origin-resolver.js +30 -0
- package/dist/server/registered-origin-resolver.js.map +1 -0
- package/dist/server/schemas/admin-directory.d.ts +62 -0
- package/dist/server/schemas/admin-directory.d.ts.map +1 -0
- package/dist/server/schemas/admin-directory.js +2 -0
- package/dist/server/schemas/admin-directory.js.map +1 -0
- package/dist/server/schemas/index.d.ts +151 -0
- package/dist/server/schemas/index.d.ts.map +1 -0
- package/dist/server/schemas/index.js +71 -0
- package/dist/server/schemas/index.js.map +1 -0
- package/dist/server/schemas/session.d.ts +22 -0
- package/dist/server/schemas/session.d.ts.map +1 -0
- package/dist/server/schemas/session.js +2 -0
- package/dist/server/schemas/session.js.map +1 -0
- package/dist/server/services/account-linking.service.d.ts +43 -0
- package/dist/server/services/account-linking.service.d.ts.map +1 -0
- package/dist/server/services/account-linking.service.descriptor.d.ts +8 -0
- package/dist/server/services/account-linking.service.descriptor.d.ts.map +1 -0
- package/dist/server/services/account-linking.service.descriptor.js +9 -0
- package/dist/server/services/account-linking.service.descriptor.js.map +1 -0
- package/dist/server/services/account-linking.service.js +178 -0
- package/dist/server/services/account-linking.service.js.map +1 -0
- package/dist/server/session-revocation.d.ts +70 -0
- package/dist/server/session-revocation.d.ts.map +1 -0
- package/dist/server/session-revocation.js +112 -0
- package/dist/server/session-revocation.js.map +1 -0
- package/dist/server/session-verifier.d.ts +69 -0
- package/dist/server/session-verifier.d.ts.map +1 -0
- package/dist/server/session-verifier.js +15 -0
- package/dist/server/session-verifier.js.map +1 -0
- package/dist/storage/auth-accounts.storage.descriptor.d.ts +74 -0
- package/dist/storage/auth-accounts.storage.descriptor.d.ts.map +1 -0
- package/dist/storage/auth-accounts.storage.descriptor.js +46 -0
- package/dist/storage/auth-accounts.storage.descriptor.js.map +1 -0
- package/dist/storage/auth-accounts.storage.manifest.impl.d.ts +18 -0
- package/dist/storage/auth-accounts.storage.manifest.impl.d.ts.map +1 -0
- package/dist/storage/auth-accounts.storage.manifest.impl.js +69 -0
- package/dist/storage/auth-accounts.storage.manifest.impl.js.map +1 -0
- package/dist/svelte/augmentations/users.impl.browser.d.ts +10 -0
- package/dist/svelte/augmentations/users.impl.browser.d.ts.map +1 -0
- package/dist/svelte/augmentations/users.impl.browser.js +74 -0
- package/dist/svelte/auth-method.d.ts +22 -0
- package/dist/svelte/auth-method.d.ts.map +1 -0
- package/dist/svelte/auth-method.js +24 -0
- package/dist/svelte/auth-svelte.plugin.d.ts +3 -0
- package/dist/svelte/auth-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/auth-svelte.plugin.js +11 -0
- package/dist/svelte/auth-variants.d.ts +56 -0
- package/dist/svelte/auth-variants.d.ts.map +1 -0
- package/dist/svelte/auth-variants.js +35 -0
- package/dist/svelte/browser-window.d.ts +7 -0
- package/dist/svelte/browser-window.d.ts.map +1 -0
- package/dist/svelte/browser-window.js +8 -0
- package/dist/svelte/component-logging.d.ts +6 -0
- package/dist/svelte/component-logging.d.ts.map +1 -0
- package/dist/svelte/component-logging.js +16 -0
- package/dist/svelte/components/AuthConnectedAccountsPanel.svelte +326 -0
- package/dist/svelte/components/AuthConnectedAccountsPanel.svelte.d.ts +19 -0
- package/dist/svelte/components/AuthConnectedAccountsPanel.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AuthSessionsPanel.svelte +302 -0
- package/dist/svelte/components/AuthSessionsPanel.svelte.d.ts +31 -0
- package/dist/svelte/components/AuthSessionsPanel.svelte.d.ts.map +1 -0
- package/dist/svelte/components/BrowserSessionBridge.svelte +24 -0
- package/dist/svelte/components/BrowserSessionBridge.svelte.d.ts +15 -0
- package/dist/svelte/components/BrowserSessionBridge.svelte.d.ts.map +1 -0
- package/dist/svelte/components/DeviceAuthorizationPanel.svelte +374 -0
- package/dist/svelte/components/DeviceAuthorizationPanel.svelte.d.ts +20 -0
- package/dist/svelte/components/DeviceAuthorizationPanel.svelte.d.ts.map +1 -0
- package/dist/svelte/components/OAuthMethodPicker.svelte +132 -0
- package/dist/svelte/components/OAuthMethodPicker.svelte.d.ts +24 -0
- package/dist/svelte/components/OAuthMethodPicker.svelte.d.ts.map +1 -0
- package/dist/svelte/components/PasswordStrengthMeter.svelte +38 -0
- package/dist/svelte/components/PasswordStrengthMeter.svelte.d.ts +15 -0
- package/dist/svelte/components/PasswordStrengthMeter.svelte.d.ts.map +1 -0
- package/dist/svelte/components/RequireAuth.svelte +59 -0
- package/dist/svelte/components/RequireAuth.svelte.d.ts +24 -0
- package/dist/svelte/components/RequireAuth.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SessionTimer.svelte +116 -0
- package/dist/svelte/components/SessionTimer.svelte.d.ts +36 -0
- package/dist/svelte/components/SessionTimer.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SessionWatcher.svelte +70 -0
- package/dist/svelte/components/SessionWatcher.svelte.d.ts +19 -0
- package/dist/svelte/components/SessionWatcher.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SignInForm.svelte +357 -0
- package/dist/svelte/components/SignInForm.svelte.d.ts +55 -0
- package/dist/svelte/components/SignInForm.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SignInHub.svelte +103 -0
- package/dist/svelte/components/SignInHub.svelte.d.ts +38 -0
- package/dist/svelte/components/SignInHub.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SignOutButton.svelte +83 -0
- package/dist/svelte/components/SignOutButton.svelte.d.ts +23 -0
- package/dist/svelte/components/SignOutButton.svelte.d.ts.map +1 -0
- package/dist/svelte/components/SignUpForm.svelte +437 -0
- package/dist/svelte/components/SignUpForm.svelte.d.ts +39 -0
- package/dist/svelte/components/SignUpForm.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/CompleteStep.svelte +23 -0
- package/dist/svelte/components/mfa-setup/CompleteStep.svelte.d.ts +5 -0
- package/dist/svelte/components/mfa-setup/CompleteStep.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/PasswordStep.svelte +60 -0
- package/dist/svelte/components/mfa-setup/PasswordStep.svelte.d.ts +5 -0
- package/dist/svelte/components/mfa-setup/PasswordStep.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/QrCodeStep.svelte +56 -0
- package/dist/svelte/components/mfa-setup/QrCodeStep.svelte.d.ts +5 -0
- package/dist/svelte/components/mfa-setup/QrCodeStep.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/RecoveryCodesStep.svelte +42 -0
- package/dist/svelte/components/mfa-setup/RecoveryCodesStep.svelte.d.ts +5 -0
- package/dist/svelte/components/mfa-setup/RecoveryCodesStep.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/VerifyStep.svelte +68 -0
- package/dist/svelte/components/mfa-setup/VerifyStep.svelte.d.ts +5 -0
- package/dist/svelte/components/mfa-setup/VerifyStep.svelte.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/schemas/index.d.ts +35 -0
- package/dist/svelte/components/mfa-setup/schemas/index.d.ts.map +1 -0
- package/dist/svelte/components/mfa-setup/schemas/index.js +1 -0
- package/dist/svelte/components/phone-auth/OtpCodeFields.svelte +119 -0
- package/dist/svelte/components/phone-auth/OtpCodeFields.svelte.d.ts +5 -0
- package/dist/svelte/components/phone-auth/OtpCodeFields.svelte.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/OtpInput.svelte +192 -0
- package/dist/svelte/components/phone-auth/OtpInput.svelte.d.ts +5 -0
- package/dist/svelte/components/phone-auth/OtpInput.svelte.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/PhoneAuthFlow.svelte +151 -0
- package/dist/svelte/components/phone-auth/PhoneAuthFlow.svelte.d.ts +5 -0
- package/dist/svelte/components/phone-auth/PhoneAuthFlow.svelte.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/PhoneInput.svelte +141 -0
- package/dist/svelte/components/phone-auth/PhoneInput.svelte.d.ts +5 -0
- package/dist/svelte/components/phone-auth/PhoneInput.svelte.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/PhoneMagicLinkFlow.svelte +171 -0
- package/dist/svelte/components/phone-auth/PhoneMagicLinkFlow.svelte.d.ts +5 -0
- package/dist/svelte/components/phone-auth/PhoneMagicLinkFlow.svelte.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/schemas/index.d.ts +60 -0
- package/dist/svelte/components/phone-auth/schemas/index.d.ts.map +1 -0
- package/dist/svelte/components/phone-auth/schemas/index.js +1 -0
- package/dist/svelte/index.d.ts +79 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +71 -0
- package/dist/svelte/loaders.d.ts +63 -0
- package/dist/svelte/loaders.d.ts.map +1 -0
- package/dist/svelte/loaders.js +59 -0
- package/dist/svelte/navigation-effect.d.ts +7 -0
- package/dist/svelte/navigation-effect.d.ts.map +1 -0
- package/dist/svelte/navigation-effect.js +16 -0
- package/dist/svelte/outcome.d.ts +24 -0
- package/dist/svelte/outcome.d.ts.map +1 -0
- package/dist/svelte/outcome.js +38 -0
- package/dist/svelte/password.d.ts +40 -0
- package/dist/svelte/password.d.ts.map +1 -0
- package/dist/svelte/password.js +66 -0
- package/dist/svelte/session-warmup.d.ts +6 -0
- package/dist/svelte/session-warmup.d.ts.map +1 -0
- package/dist/svelte/session-warmup.js +12 -0
- package/dist/svelte/sessions.d.ts +18 -0
- package/dist/svelte/sessions.d.ts.map +1 -0
- package/dist/svelte/sessions.js +56 -0
- package/dist/svelte/state.svelte.d.ts +20 -0
- package/dist/svelte/state.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.js +45 -0
- package/dist/svelte/styles.css +10 -0
- package/dist/svelte/types.d.ts +37 -0
- package/dist/svelte/types.d.ts.map +1 -0
- package/dist/svelte/types.js +9 -0
- package/dist/system/index.d.ts +2 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +4 -0
- package/dist/system/index.js.map +1 -0
- package/dist/system/internal-api/client.d.ts +34 -0
- package/dist/system/internal-api/client.d.ts.map +1 -0
- package/dist/system/internal-api/client.js +117 -0
- package/dist/system/internal-api/client.js.map +1 -0
- package/dist/system/internal-api/endpoints.d.ts +15 -0
- package/dist/system/internal-api/endpoints.d.ts.map +1 -0
- package/dist/system/internal-api/endpoints.js +15 -0
- package/dist/system/internal-api/endpoints.js.map +1 -0
- package/dist/system/internal-api/index.d.ts +5 -0
- package/dist/system/internal-api/index.d.ts.map +1 -0
- package/dist/system/internal-api/index.js +4 -0
- package/dist/system/internal-api/index.js.map +1 -0
- package/dist/system/internal-api/schemas.d.ts +188 -0
- package/dist/system/internal-api/schemas.d.ts.map +1 -0
- package/dist/system/internal-api/schemas.js +123 -0
- package/dist/system/internal-api/schemas.js.map +1 -0
- package/dist/system/require-admin.d.ts +25 -0
- package/dist/system/require-admin.d.ts.map +1 -0
- package/dist/system/require-admin.js +184 -0
- package/dist/system/require-admin.js.map +1 -0
- package/dist/system/session-handle.d.ts +15 -0
- package/dist/system/session-handle.d.ts.map +1 -0
- package/dist/system/session-handle.js +104 -0
- package/dist/system/session-handle.js.map +1 -0
- package/dist/system/sign-out-handoff.d.ts +88 -0
- package/dist/system/sign-out-handoff.d.ts.map +1 -0
- package/dist/system/sign-out-handoff.js +136 -0
- package/dist/system/sign-out-handoff.js.map +1 -0
- package/dist/tui/auth-actions.client.consumer.d.ts +11 -0
- package/dist/tui/auth-actions.client.consumer.d.ts.map +1 -0
- package/dist/tui/auth-actions.client.consumer.js +19 -0
- package/dist/tui/auth-actions.client.consumer.js.map +1 -0
- package/dist/tui/auth-tui.plugin.d.ts +3 -0
- package/dist/tui/auth-tui.plugin.d.ts.map +1 -0
- package/dist/tui/auth-tui.plugin.js +25 -0
- package/dist/tui/auth-tui.plugin.js.map +1 -0
- package/dist/tui/auth.tui-app.descriptor.d.ts +4 -0
- package/dist/tui/auth.tui-app.descriptor.d.ts.map +1 -0
- package/dist/tui/auth.tui-app.descriptor.js +19 -0
- package/dist/tui/auth.tui-app.descriptor.js.map +1 -0
- package/dist/tui/auth.tui-app.impl.consumer.d.ts +4 -0
- package/dist/tui/auth.tui-app.impl.consumer.d.ts.map +1 -0
- package/dist/tui/auth.tui-app.impl.consumer.js +46 -0
- package/dist/tui/auth.tui-app.impl.consumer.js.map +1 -0
- package/dist/tui/auth.tui-state.descriptor.d.ts +7 -0
- package/dist/tui/auth.tui-state.descriptor.d.ts.map +1 -0
- package/dist/tui/auth.tui-state.descriptor.js +21 -0
- package/dist/tui/auth.tui-state.descriptor.js.map +1 -0
- package/dist/tui/auth.tui-state.impl.consumer.d.ts +5 -0
- package/dist/tui/auth.tui-state.impl.consumer.d.ts.map +1 -0
- package/dist/tui/auth.tui-state.impl.consumer.js +122 -0
- package/dist/tui/auth.tui-state.impl.consumer.js.map +1 -0
- package/dist/tui/auth.tui-state.key.d.ts +27 -0
- package/dist/tui/auth.tui-state.key.d.ts.map +1 -0
- package/dist/tui/auth.tui-state.key.js +18 -0
- package/dist/tui/auth.tui-state.key.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +2 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +916 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auth/device-session` secrets store (rc05 §2.2-§2.3; rc01 §2.1).
|
|
3
|
+
*
|
|
4
|
+
* `get(tier, 'VIBES_AUTH_TOKEN')` answers the app bearer for the stored
|
|
5
|
+
* `vibes auth login` of the environment this host calls. The tier argument is
|
|
6
|
+
* not the partition: the login is partitioned by the environment it was stored
|
|
7
|
+
* under (rc01 B17), which `resolveCredentialEnvironmentId` names.
|
|
8
|
+
*
|
|
9
|
+
* The bearer is minted from the stored credential by `resolveAppJwt` and kept
|
|
10
|
+
* per runtime. A minted JWT is re-minted on the first read inside two minutes
|
|
11
|
+
* of its `exp`; an opaque durable credential never decays. No read ever sees
|
|
12
|
+
* the process environment: a host-provided bearer comes through
|
|
13
|
+
* `host-credentials` on a `hostCredentials` host instead.
|
|
14
|
+
*
|
|
15
|
+
* The minted Bearer [REDACTED] also retained on this store instance. The kernel
|
|
16
|
+
* isolates retained `runtime/client` instances per declared scope, so a
|
|
17
|
+
* `patchDeclaredScope` constructs a fresh auth client with an empty bearer
|
|
18
|
+
* map even though the stored login never changed. The store's own impl cache
|
|
19
|
+
* is scope-independent, so the mirror carries still-usable bearers across
|
|
20
|
+
* those generations without re-opening the credential store. Sign-in and
|
|
21
|
+
* sign-out clear the mirror through `invalidateDeviceSession`, so a later
|
|
22
|
+
* generation can never serve a retired login.
|
|
23
|
+
*
|
|
24
|
+
* Failures:
|
|
25
|
+
* - no stored login: `undefined`, which the kernel reports as `NOT_FOUND`
|
|
26
|
+
* `credential-not-set`;
|
|
27
|
+
* - the stored login, or the only bearer it yields, has expired:
|
|
28
|
+
* `AUTH_REQUIRED` `session-expired`;
|
|
29
|
+
* - a session login whose app-JWT exchange failed, with no still-valid bearer
|
|
30
|
+
* to keep: `UNAVAILABLE` `refresh-failed`.
|
|
31
|
+
*/
|
|
32
|
+
import { type KindContext, type RuntimeDescriptor } from '@vibesdotdev/kernel';
|
|
33
|
+
import type { AuthAuthorityState } from '../schemas/authority-state.ts';
|
|
34
|
+
export { invalidateDeviceSession } from './device-session.state.ts';
|
|
35
|
+
export default class DeviceSessionStore {
|
|
36
|
+
readonly id = "auth/device-session";
|
|
37
|
+
readonly descriptor: RuntimeDescriptor;
|
|
38
|
+
private readonly runtime;
|
|
39
|
+
/**
|
|
40
|
+
* Bearer [REDACTED] that survives scope-patch authority generations (see the
|
|
41
|
+
* module comment), with the generation it was baselined against. This
|
|
42
|
+
* instance is kernel-cached independently of declared scope; it is never
|
|
43
|
+
* ambient, never persisted, and never shared between runtimes.
|
|
44
|
+
*/
|
|
45
|
+
private readonly retainedBearers;
|
|
46
|
+
private retainedAuthority?;
|
|
47
|
+
private retainedEpoch?;
|
|
48
|
+
constructor(descriptor: RuntimeDescriptor, context: KindContext);
|
|
49
|
+
private environmentId;
|
|
50
|
+
/**
|
|
51
|
+
* A still-usable Bearer [REDACTED] environment that needs no credential-store
|
|
52
|
+
* read, if one survived. A new authority generation (a scope patch
|
|
53
|
+
* re-created `runtime/client#auth`) keeps the mirror: the stored login it
|
|
54
|
+
* was minted from never changed, and the fresh generation's map is seeded
|
|
55
|
+
* so its own invalidation keeps working. An epoch bump within one
|
|
56
|
+
* generation (sign-in, sign-out, verdict drop) retires every mirror entry
|
|
57
|
+
* the authority map no longer holds.
|
|
58
|
+
*/
|
|
59
|
+
peekRetainedBearer(state: AuthAuthorityState, environmentId: string): string | undefined;
|
|
60
|
+
/** Remember a freshly read Bearer [REDACTED] the authority map and the mirror. */
|
|
61
|
+
retainBearer(state: AuthAuthorityState, environmentId: string, token: string): void;
|
|
62
|
+
/** Forget a Bearer [REDACTED] both maps (no login, expired, unusable). */
|
|
63
|
+
forgetBearer(state: AuthAuthorityState, environmentId: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Sign-in/out entrypoint: drop this environment's (or every) retained
|
|
66
|
+
* bearer, so a later authority generation can never serve a retired login.
|
|
67
|
+
* Called synchronously from `invalidateDeviceSession`.
|
|
68
|
+
*/
|
|
69
|
+
clearRetainedBearer(environmentId?: string): void;
|
|
70
|
+
get(_tier: string, key: string): Promise<string | undefined>;
|
|
71
|
+
getAll(tier: string): Promise<Record<string, string>>;
|
|
72
|
+
list(_tier: string): Promise<Array<{
|
|
73
|
+
key: string;
|
|
74
|
+
hasValue: boolean;
|
|
75
|
+
source: string;
|
|
76
|
+
}>>;
|
|
77
|
+
set(): Promise<void>;
|
|
78
|
+
unset(): Promise<void>;
|
|
79
|
+
setAll(): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=device-session.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-session.store.d.ts","sourceRoot":"","sources":["../../src/device-session/device-session.store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAOxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAgHpE,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACtC,QAAQ,CAAC,EAAE,yBAA2B;IACtC,QAAQ,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
|
+
/**
|
|
2
|
+
* `auth/device-session`: the `secrets/store` that answers the signed-in
|
|
3
|
+
* user's bearer on an `interactiveSession` host (rc05 §2.2-§2.3).
|
|
4
|
+
*
|
|
5
|
+
* It is `selection: 'by-id'`, so scope resolution never picks it and it never
|
|
6
|
+
* shadows `encrypted-local`; `resolveCallerBearer` names it in the reference.
|
|
7
|
+
* It answers only `VIBES_AUTH_TOKEN`, from the active profile's stored
|
|
8
|
+
* `vibes auth login`, partitioned by the environment the login was stored
|
|
9
|
+
* under (rc01 B17: never by the declared tier).
|
|
10
|
+
*
|
|
11
|
+
* `backend` is this store's own open id (rc05 §2.3). `priority` orders only
|
|
12
|
+
* scope stores, so it does not apply here.
|
|
13
|
+
*/
|
|
14
|
+
import type { RuntimeDescriptor } from '@vibesdotdev/kernel';
|
|
15
|
+
export declare const DEVICE_SESSION_STORE_ID = "auth/device-session";
|
|
16
|
+
/** The one key this store answers. */
|
|
17
|
+
export declare const DEVICE_SESSION_BEARER_KEY = "VIBES_AUTH_TOKEN";
|
|
18
|
+
/** The `secrets/store` descriptor fields this store declares (auth does not depend on secrets). */
|
|
19
|
+
type DeviceSessionStoreDescriptor = RuntimeDescriptor & {
|
|
20
|
+
backend: string;
|
|
21
|
+
selection: 'by-id';
|
|
22
|
+
tiers: string[];
|
|
23
|
+
priority: number;
|
|
24
|
+
};
|
|
25
|
+
declare const deviceSessionStoreDescriptor: DeviceSessionStoreDescriptor;
|
|
26
|
+
export default deviceSessionStoreDescriptor;
|
|
27
|
+
//# sourceMappingURL=device-session.store.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-session.store.descriptor.d.ts","sourceRoot":"","sources":["../../src/device-session/device-session.store.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,sCAAsC;AACtC,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,mGAAmG;AACnG,KAAK,4BAA4B,GAAG,iBAAiB,GAAG;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,4BAA4B,EAAE,4BAYnC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `auth/device-session`: the `secrets/store` that answers the signed-in
|
|
3
|
+
* user's bearer on an `interactiveSession` host (rc05 §2.2-§2.3).
|
|
4
|
+
*
|
|
5
|
+
* It is `selection: 'by-id'`, so scope resolution never picks it and it never
|
|
6
|
+
* shadows `encrypted-local`; `resolveCallerBearer` names it in the reference.
|
|
7
|
+
* It answers only `VIBES_AUTH_TOKEN`, from the active profile's stored
|
|
8
|
+
* `vibes auth login`, partitioned by the environment the login was stored
|
|
9
|
+
* under (rc01 B17: never by the declared tier).
|
|
10
|
+
*
|
|
11
|
+
* `backend` is this store's own open id (rc05 §2.3). `priority` orders only
|
|
12
|
+
* scope stores, so it does not apply here.
|
|
13
|
+
*/
|
|
14
|
+
export const DEVICE_SESSION_STORE_ID = 'auth/device-session';
|
|
15
|
+
/** The one key this store answers. */
|
|
16
|
+
export const DEVICE_SESSION_BEARER_KEY = 'VIBES_AUTH_TOKEN';
|
|
17
|
+
const deviceSessionStoreDescriptor = {
|
|
18
|
+
id: DEVICE_SESSION_STORE_ID,
|
|
19
|
+
kind: 'secrets/store',
|
|
20
|
+
name: 'Device session',
|
|
21
|
+
description: "The signed-in user's app bearer from the stored `vibes auth login`, reachable only by id.",
|
|
22
|
+
tags: ['auth', 'identity-scoped', 'by-id'],
|
|
23
|
+
enabled: true,
|
|
24
|
+
backend: 'auth/device-session',
|
|
25
|
+
selection: 'by-id',
|
|
26
|
+
tiers: ['local', 'dev', 'staging', 'production'],
|
|
27
|
+
priority: 0
|
|
28
|
+
};
|
|
29
|
+
export default deviceSessionStoreDescriptor;
|
|
30
|
+
//# sourceMappingURL=device-session.store.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-session.store.descriptor.js","sourceRoot":"","sources":["../../src/device-session/device-session.store.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D,sCAAsC;AACtC,MAAM,CAAC,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAU5D,MAAM,4BAA4B,GAAiC;IAClE,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACV,2FAA2F;IAC5F,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC;IAC1C,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC;IAChD,QAAQ,EAAE,CAAC;CACX,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auth/device-session` secrets store (rc05 §2.2-§2.3; rc01 §2.1).
|
|
3
|
+
*
|
|
4
|
+
* `get(tier, 'VIBES_AUTH_TOKEN')` answers the app bearer for the stored
|
|
5
|
+
* `vibes auth login` of the environment this host calls. The tier argument is
|
|
6
|
+
* not the partition: the login is partitioned by the environment it was stored
|
|
7
|
+
* under (rc01 B17), which `resolveCredentialEnvironmentId` names.
|
|
8
|
+
*
|
|
9
|
+
* The bearer is minted from the stored credential by `resolveAppJwt` and kept
|
|
10
|
+
* per runtime. A minted JWT is re-minted on the first read inside two minutes
|
|
11
|
+
* of its `exp`; an opaque durable credential never decays. No read ever sees
|
|
12
|
+
* the process environment: a host-provided bearer comes through
|
|
13
|
+
* `host-credentials` on a `hostCredentials` host instead.
|
|
14
|
+
*
|
|
15
|
+
* The minted Bearer [REDACTED] also retained on this store instance. The kernel
|
|
16
|
+
* isolates retained `runtime/client` instances per declared scope, so a
|
|
17
|
+
* `patchDeclaredScope` constructs a fresh auth client with an empty bearer
|
|
18
|
+
* map even though the stored login never changed. The store's own impl cache
|
|
19
|
+
* is scope-independent, so the mirror carries still-usable bearers across
|
|
20
|
+
* those generations without re-opening the credential store. Sign-in and
|
|
21
|
+
* sign-out clear the mirror through `invalidateDeviceSession`, so a later
|
|
22
|
+
* generation can never serve a retired login.
|
|
23
|
+
*
|
|
24
|
+
* Failures:
|
|
25
|
+
* - no stored login: `undefined`, which the kernel reports as `NOT_FOUND`
|
|
26
|
+
* `credential-not-set`;
|
|
27
|
+
* - the stored login, or the only bearer it yields, has expired:
|
|
28
|
+
* `AUTH_REQUIRED` `session-expired`;
|
|
29
|
+
* - a session login whose app-JWT exchange failed, with no still-valid bearer
|
|
30
|
+
* to keep: `UNAVAILABLE` `refresh-failed`.
|
|
31
|
+
*/
|
|
32
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
33
|
+
import { resolveAppJwt } from "../client/app-authority.js";
|
|
34
|
+
import { decodeJWTUnsafe } from "../jwt/index.js";
|
|
35
|
+
import { isCredentialStoreRuntime, loadStoredCredentials, resolveCredentialEnvironmentId } from "../features/services/credential-store.js";
|
|
36
|
+
import { DEVICE_SESSION_BEARER_KEY, DEVICE_SESSION_STORE_ID } from "./device-session.store.descriptor.js";
|
|
37
|
+
import { deviceSessionState } from "./device-session.state.js";
|
|
38
|
+
export { invalidateDeviceSession } from "./device-session.state.js";
|
|
39
|
+
/** A minted JWT is re-minted on the first read this long before its `exp`. */
|
|
40
|
+
const REFRESH_LEAD_MS = 2 * 60_000;
|
|
41
|
+
function jwtExpiryMs(token) {
|
|
42
|
+
const exp = decodeJWTUnsafe(token)?.exp;
|
|
43
|
+
return exp === undefined ? null : exp * 1000;
|
|
44
|
+
}
|
|
45
|
+
function isUsable(token, nowMs) {
|
|
46
|
+
const expiresAtMs = jwtExpiryMs(token);
|
|
47
|
+
return expiresAtMs === null || expiresAtMs - nowMs >= REFRESH_LEAD_MS;
|
|
48
|
+
}
|
|
49
|
+
function isUnexpired(token, nowMs) {
|
|
50
|
+
const expiresAtMs = jwtExpiryMs(token);
|
|
51
|
+
return expiresAtMs === null || expiresAtMs > nowMs;
|
|
52
|
+
}
|
|
53
|
+
function sessionExpired(environmentId) {
|
|
54
|
+
return new CapabilityError('The stored sign-in has expired.', 'AUTH_REQUIRED', {
|
|
55
|
+
reason: 'session-expired',
|
|
56
|
+
recoveryHint: 'Run: vibes auth login',
|
|
57
|
+
details: { store: DEVICE_SESSION_STORE_ID, environment: environmentId }
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function refreshFailed(environmentId) {
|
|
61
|
+
return new CapabilityError('Vibes Auth did not exchange the stored sign-in for an app bearer.', 'UNAVAILABLE', {
|
|
62
|
+
reason: 'refresh-failed',
|
|
63
|
+
retryable: true,
|
|
64
|
+
recoveryHint: 'Check that Vibes Auth is reachable, then retry. If it keeps failing, run: vibes auth login',
|
|
65
|
+
details: { store: DEVICE_SESSION_STORE_ID, environment: environmentId }
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async function readBearer(runtime, environmentId, store) {
|
|
69
|
+
const state = await deviceSessionState(runtime);
|
|
70
|
+
const cached = state.bearers.get(environmentId);
|
|
71
|
+
if (cached !== undefined && isUsable(cached, Date.now()))
|
|
72
|
+
return cached;
|
|
73
|
+
// A scope patch re-created runtime/client#auth with an empty bearer map
|
|
74
|
+
// while the stored login never changed: serve a still-usable retained
|
|
75
|
+
// Bearer [REDACTED] of re-opening the credential store.
|
|
76
|
+
const retained = store.peekRetainedBearer(state, environmentId);
|
|
77
|
+
if (retained !== undefined)
|
|
78
|
+
return retained;
|
|
79
|
+
const epoch = state.epoch;
|
|
80
|
+
const loaded = new Array();
|
|
81
|
+
const token = (await resolveAppJwt({
|
|
82
|
+
runtime,
|
|
83
|
+
environment: environmentId,
|
|
84
|
+
loadCredentials: async () => {
|
|
85
|
+
const credential = await loadStoredCredentials(runtime, environmentId);
|
|
86
|
+
loaded.push(credential);
|
|
87
|
+
return credential;
|
|
88
|
+
}
|
|
89
|
+
}))?.trim();
|
|
90
|
+
// A sign-in or sign-out landed while this read was loading: what it loaded
|
|
91
|
+
// may be the login that was just replaced, so read the current one.
|
|
92
|
+
if (state.epoch !== epoch)
|
|
93
|
+
return readBearer(runtime, environmentId, store);
|
|
94
|
+
if (!token) {
|
|
95
|
+
store.forgetBearer(state, environmentId);
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const nowMs = Date.now();
|
|
99
|
+
const loadedCredential = loaded.at(-1) ?? null;
|
|
100
|
+
const storedExpiry = loadedCredential?.expiresAt ? Date.parse(loadedCredential.expiresAt) : Number.NaN;
|
|
101
|
+
if (Number.isFinite(storedExpiry) && storedExpiry <= nowMs) {
|
|
102
|
+
store.forgetBearer(state, environmentId);
|
|
103
|
+
throw sessionExpired(environmentId);
|
|
104
|
+
}
|
|
105
|
+
// A session login yields the raw session token when the exchange fails. That
|
|
106
|
+
// is not an app bearer (apps accept a JWT or a real API key), so keep the
|
|
107
|
+
// previous JWT while it is still valid and exchange again on the next read.
|
|
108
|
+
if (loadedCredential?.type === 'session' && jwtExpiryMs(token) === null) {
|
|
109
|
+
if (cached !== undefined && jwtExpiryMs(cached) !== null && isUnexpired(cached, nowMs)) {
|
|
110
|
+
return cached;
|
|
111
|
+
}
|
|
112
|
+
throw refreshFailed(environmentId);
|
|
113
|
+
}
|
|
114
|
+
if (!isUnexpired(token, nowMs)) {
|
|
115
|
+
store.forgetBearer(state, environmentId);
|
|
116
|
+
throw sessionExpired(environmentId);
|
|
117
|
+
}
|
|
118
|
+
store.retainBearer(state, environmentId, token);
|
|
119
|
+
return token;
|
|
120
|
+
}
|
|
121
|
+
function readOnly(operation) {
|
|
122
|
+
return new CapabilityError(`The ${DEVICE_SESSION_STORE_ID} store is read-only; ${operation} goes through vibes auth.`, 'INTERNAL', {
|
|
123
|
+
reason: 'store-read-only',
|
|
124
|
+
recoveryHint: 'Run: vibes auth login, or vibes auth logout',
|
|
125
|
+
details: { store: DEVICE_SESSION_STORE_ID }
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
export default class DeviceSessionStore {
|
|
129
|
+
id = DEVICE_SESSION_STORE_ID;
|
|
130
|
+
descriptor;
|
|
131
|
+
runtime;
|
|
132
|
+
/**
|
|
133
|
+
* Bearer [REDACTED] that survives scope-patch authority generations (see the
|
|
134
|
+
* module comment), with the generation it was baselined against. This
|
|
135
|
+
* instance is kernel-cached independently of declared scope; it is never
|
|
136
|
+
* ambient, never persisted, and never shared between runtimes.
|
|
137
|
+
*/
|
|
138
|
+
retainedBearers = new Map();
|
|
139
|
+
retainedAuthority;
|
|
140
|
+
retainedEpoch;
|
|
141
|
+
constructor(descriptor, context) {
|
|
142
|
+
if (!isCredentialStoreRuntime(context?.runtime)) {
|
|
143
|
+
throw new CapabilityError(`${DEVICE_SESSION_STORE_ID} needs the runtime that composed it.`, 'INTERNAL');
|
|
144
|
+
}
|
|
145
|
+
this.descriptor = descriptor;
|
|
146
|
+
this.runtime = context.runtime;
|
|
147
|
+
}
|
|
148
|
+
environmentId() {
|
|
149
|
+
return resolveCredentialEnvironmentId(this.runtime);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A still-usable Bearer [REDACTED] environment that needs no credential-store
|
|
153
|
+
* read, if one survived. A new authority generation (a scope patch
|
|
154
|
+
* re-created `runtime/client#auth`) keeps the mirror: the stored login it
|
|
155
|
+
* was minted from never changed, and the fresh generation's map is seeded
|
|
156
|
+
* so its own invalidation keeps working. An epoch bump within one
|
|
157
|
+
* generation (sign-in, sign-out, verdict drop) retires every mirror entry
|
|
158
|
+
* the authority map no longer holds.
|
|
159
|
+
*/
|
|
160
|
+
peekRetainedBearer(state, environmentId) {
|
|
161
|
+
if (this.retainedAuthority !== state) {
|
|
162
|
+
this.retainedAuthority = state;
|
|
163
|
+
this.retainedEpoch = state.epoch;
|
|
164
|
+
}
|
|
165
|
+
else if (this.retainedEpoch !== state.epoch) {
|
|
166
|
+
for (const [environment, token] of this.retainedBearers) {
|
|
167
|
+
if (state.bearers.get(environment) !== token)
|
|
168
|
+
this.retainedBearers.delete(environment);
|
|
169
|
+
}
|
|
170
|
+
this.retainedEpoch = state.epoch;
|
|
171
|
+
}
|
|
172
|
+
const mirrored = this.retainedBearers.get(environmentId);
|
|
173
|
+
if (mirrored === undefined || !isUsable(mirrored, Date.now()))
|
|
174
|
+
return undefined;
|
|
175
|
+
state.bearers.set(environmentId, mirrored);
|
|
176
|
+
return mirrored;
|
|
177
|
+
}
|
|
178
|
+
/** Remember a freshly read Bearer [REDACTED] the authority map and the mirror. */
|
|
179
|
+
retainBearer(state, environmentId, token) {
|
|
180
|
+
state.bearers.set(environmentId, token);
|
|
181
|
+
this.retainedBearers.set(environmentId, token);
|
|
182
|
+
}
|
|
183
|
+
/** Forget a Bearer [REDACTED] both maps (no login, expired, unusable). */
|
|
184
|
+
forgetBearer(state, environmentId) {
|
|
185
|
+
state.bearers.delete(environmentId);
|
|
186
|
+
this.retainedBearers.delete(environmentId);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Sign-in/out entrypoint: drop this environment's (or every) retained
|
|
190
|
+
* bearer, so a later authority generation can never serve a retired login.
|
|
191
|
+
* Called synchronously from `invalidateDeviceSession`.
|
|
192
|
+
*/
|
|
193
|
+
clearRetainedBearer(environmentId) {
|
|
194
|
+
const id = environmentId?.trim();
|
|
195
|
+
if (id)
|
|
196
|
+
this.retainedBearers.delete(id);
|
|
197
|
+
else
|
|
198
|
+
this.retainedBearers.clear();
|
|
199
|
+
}
|
|
200
|
+
async get(_tier, key) {
|
|
201
|
+
if (key !== DEVICE_SESSION_BEARER_KEY)
|
|
202
|
+
return undefined;
|
|
203
|
+
return readBearer(this.runtime, await this.environmentId(), this);
|
|
204
|
+
}
|
|
205
|
+
async getAll(tier) {
|
|
206
|
+
const bearer = await this.get(tier, DEVICE_SESSION_BEARER_KEY);
|
|
207
|
+
return bearer === undefined ? {} : { [DEVICE_SESSION_BEARER_KEY]: bearer };
|
|
208
|
+
}
|
|
209
|
+
async list(_tier) {
|
|
210
|
+
const stored = await loadStoredCredentials(this.runtime, await this.environmentId());
|
|
211
|
+
return [
|
|
212
|
+
{ key: DEVICE_SESSION_BEARER_KEY, hasValue: Boolean(stored?.token), source: DEVICE_SESSION_STORE_ID }
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
async set() {
|
|
216
|
+
throw readOnly('signing in');
|
|
217
|
+
}
|
|
218
|
+
async unset() {
|
|
219
|
+
throw readOnly('signing out');
|
|
220
|
+
}
|
|
221
|
+
async setAll() {
|
|
222
|
+
throw readOnly('signing in');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=device-session.store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-session.store.js","sourceRoot":"","sources":["../../src/device-session/device-session.store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,eAAe,EAA4C,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACN,wBAAwB,EACxB,qBAAqB,EACrB,8BAA8B,EAE9B,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EACN,yBAAyB,EACzB,uBAAuB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC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;QACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;QAC/D,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAa;QACvB,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACrF,OAAO;YACN,EAAE,GAAG,EAAE,yBAAyB,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE;SACrG,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAG;QACR,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,KAAK;QACV,MAAM,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,MAAM;QACX,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/auth.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAmCvE,QAAA,MAAM,UAAU,EAAE,mBAejB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const authMarkdown = `---
|
|
2
|
+
title: Auth
|
|
3
|
+
summary: Flows, sessions, OAuth, and providers.
|
|
4
|
+
parent:
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Auth
|
|
9
|
+
|
|
10
|
+
Flows, sessions, OAuth, and providers. Authentication is built on Better Auth with JWT session handles; providers (including OAuth) plug in through the runtime.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
Reach for auth when your app needs to identify the caller, gate a route or worker, or talk to another service on the user's behalf — sign-in flows, session validation, OAuth connections, and the credential each request authenticates with.
|
|
15
|
+
|
|
16
|
+
## How it resolves
|
|
17
|
+
|
|
18
|
+
Auth is a runtime-resolved capability: the active provider is registered as kind \`auth/provider\` and selected by the current scope (the DB provider is server-only; the API provider is the default for CLI/consumer contexts). App code never picks one by hand — it queries the runtime:
|
|
19
|
+
|
|
20
|
+
\`\`\`ts
|
|
21
|
+
// runtime is the one your host handed you (event.locals.runtime, context.runtime).
|
|
22
|
+
const authProvider = await runtime.query('auth/provider').first();
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
:::card{title="In this section"}
|
|
26
|
+
- [\`auth.flows\`](auth.flows) — Authentication Flows
|
|
27
|
+
- [\`auth.sessions\`](auth.sessions) — Session Management
|
|
28
|
+
- [\`auth.oauth\`](auth.oauth) — OAuth Authentication
|
|
29
|
+
- [\`auth.providers\`](auth.providers) — Authentication Providers
|
|
30
|
+
- [\`auth.keys\`](auth.keys) — Key Envelopes (did:key, recipient key bundles, sign-then-encrypt)
|
|
31
|
+
:::
|
|
32
|
+
`;
|
|
33
|
+
const descriptor = {
|
|
34
|
+
kind: 'docs/topic',
|
|
35
|
+
id: 'auth',
|
|
36
|
+
title: 'Auth',
|
|
37
|
+
summary: "Flows, sessions, OAuth, and providers.",
|
|
38
|
+
body: {
|
|
39
|
+
type: 'markdown',
|
|
40
|
+
sourceType: 'raw',
|
|
41
|
+
source: authMarkdown
|
|
42
|
+
},
|
|
43
|
+
order: 3,
|
|
44
|
+
tags: ['auth', 'overview'],
|
|
45
|
+
surfaces: ['web', 'in-app'],
|
|
46
|
+
hardware: ['consumer', 'cloud'],
|
|
47
|
+
enabled: true
|
|
48
|
+
};
|
|
49
|
+
export default descriptor;
|
|
50
|
+
//# sourceMappingURL=auth.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/auth.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BpB,CAAC;AAEF,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,wCAAwC;IACjD,IAAI,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,YAAY;KACpB;IACD,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.providers.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/auth.providers.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,QAAA,MAAM,UAAU,EAAE,mBA8KjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'docs/topic',
|
|
3
|
+
id: 'auth.providers',
|
|
4
|
+
title: 'Authentication Providers',
|
|
5
|
+
summary: 'The auth/provider runtime kind: how the runtime authenticates to access resources',
|
|
6
|
+
body: {
|
|
7
|
+
type: 'markdown',
|
|
8
|
+
sourceType: 'raw',
|
|
9
|
+
source: `---
|
|
10
|
+
id: auth.providers
|
|
11
|
+
title: Authentication Providers
|
|
12
|
+
summary: The auth/provider runtime kind — how the runtime authenticates to access resources
|
|
13
|
+
tags: [auth, providers, runtime-kind, resolution]
|
|
14
|
+
parent: auth
|
|
15
|
+
order: 4
|
|
16
|
+
surfaces: [cli, web, in-app]
|
|
17
|
+
hardware: [consumer, cloud]
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Authentication Providers
|
|
21
|
+
|
|
22
|
+
The \`auth/provider\` runtime kind controls **how the runtime authenticates to access resources** — not end-user login. A provider supplies an auth context (token + headers) that downstream API clients and tools attach to their requests.
|
|
23
|
+
|
|
24
|
+
Two built-in providers are auto-discovered:
|
|
25
|
+
|
|
26
|
+
- **\`api\`** — the default. Reads credentials from the auth config and authenticates over HTTP. Available in every scope (CLI, consumer, web).
|
|
27
|
+
- **\`db\`** — direct database access for server-side operations. Only resolves on cloud hardware with the \`workers/worker\` surface; otherwise the runtime falls back to \`api\`.
|
|
28
|
+
|
|
29
|
+
End-user concerns (email/password login, OAuth sign-in, sessions) live in the related topics linked at the bottom of this page.
|
|
30
|
+
|
|
31
|
+
## Provider implementation interface
|
|
32
|
+
|
|
33
|
+
Resolved providers implement \`AuthProviderImplementation\` (from \`@vibesdotdev/auth\`):
|
|
34
|
+
|
|
35
|
+
\`\`\`ts
|
|
36
|
+
import type {
|
|
37
|
+
AuthProviderImplementation,
|
|
38
|
+
AuthProviderDescriptor,
|
|
39
|
+
AuthProviderType,
|
|
40
|
+
AuthContext
|
|
41
|
+
} from '@vibesdotdev/auth';
|
|
42
|
+
|
|
43
|
+
interface AuthProviderImplementation {
|
|
44
|
+
readonly descriptor: AuthProviderDescriptor;
|
|
45
|
+
readonly type: AuthProviderType; // 'api' | 'db'
|
|
46
|
+
|
|
47
|
+
// Returns the auth context (token + headers) for outgoing requests
|
|
48
|
+
getAuthContext(): Promise<AuthContext>;
|
|
49
|
+
|
|
50
|
+
// Whether this provider can operate in the current scope
|
|
51
|
+
isAvailable(): Promise<boolean>;
|
|
52
|
+
|
|
53
|
+
// Validates that the current credentials authenticate successfully
|
|
54
|
+
validateCredentials(): Promise<{ valid: boolean; error?: string }>;
|
|
55
|
+
|
|
56
|
+
// Optional cleanup
|
|
57
|
+
dispose?(): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
\`getAuthContext()\` returns an \`AuthContext\`:
|
|
62
|
+
|
|
63
|
+
\`\`\`ts
|
|
64
|
+
interface AuthContext {
|
|
65
|
+
isAuthenticated: boolean;
|
|
66
|
+
userId?: string;
|
|
67
|
+
token?: string;
|
|
68
|
+
headers?: Record<string, string>;
|
|
69
|
+
error?: string;
|
|
70
|
+
}
|
|
71
|
+
\`\`\`
|
|
72
|
+
|
|
73
|
+
## Provider descriptor
|
|
74
|
+
|
|
75
|
+
Descriptors validate against \`AuthProviderDescriptorSchema\`. The shape is the runtime descriptor base plus auth-specific fields:
|
|
76
|
+
|
|
77
|
+
\`\`\`ts
|
|
78
|
+
import type { AuthProviderDescriptor } from '@vibesdotdev/auth';
|
|
79
|
+
|
|
80
|
+
const apiProvider: AuthProviderDescriptor = {
|
|
81
|
+
kind: 'auth/provider',
|
|
82
|
+
id: 'api',
|
|
83
|
+
name: 'API Authentication',
|
|
84
|
+
description: 'HTTP-based authentication using credentials from auth config',
|
|
85
|
+
enabled: true,
|
|
86
|
+
type: 'api', // 'api' | 'db'
|
|
87
|
+
isDefault: true,
|
|
88
|
+
api: {
|
|
89
|
+
tokenSource: 'config', // 'config' | 'env' | 'static'
|
|
90
|
+
configKey: 'credentials.token',
|
|
91
|
+
headerName: 'Authorization',
|
|
92
|
+
tokenPrefix: 'Bearer'
|
|
93
|
+
},
|
|
94
|
+
priority: 0
|
|
95
|
+
};
|
|
96
|
+
\`\`\`
|
|
97
|
+
|
|
98
|
+
The \`db\` provider constrains its scope so it never resolves on the client:
|
|
99
|
+
|
|
100
|
+
\`\`\`ts
|
|
101
|
+
const dbProvider: AuthProviderDescriptor = {
|
|
102
|
+
kind: 'auth/provider',
|
|
103
|
+
id: 'db',
|
|
104
|
+
name: 'Database Authentication',
|
|
105
|
+
enabled: true,
|
|
106
|
+
type: 'db',
|
|
107
|
+
isDefault: false,
|
|
108
|
+
hardware: ['cloud'],
|
|
109
|
+
surfaces: ['workers/worker'],
|
|
110
|
+
db: { useSessionContext: true, bypassAuth: false },
|
|
111
|
+
priority: -100
|
|
112
|
+
};
|
|
113
|
+
\`\`\`
|
|
114
|
+
|
|
115
|
+
## Resolving the provider
|
|
116
|
+
|
|
117
|
+
Consumers query the runtime; the kind's resolver picks the right provider for the current scope:
|
|
118
|
+
|
|
119
|
+
\`\`\`ts
|
|
120
|
+
import type { AuthProviderImplementation } from '@vibesdotdev/auth';
|
|
121
|
+
|
|
122
|
+
const provider = (await runtime
|
|
123
|
+
.query('auth/provider')
|
|
124
|
+
.resolve()) as AuthProviderImplementation | null;
|
|
125
|
+
|
|
126
|
+
if (provider && (await provider.isAvailable())) {
|
|
127
|
+
const ctx = await provider.getAuthContext();
|
|
128
|
+
if (ctx.isAuthenticated) {
|
|
129
|
+
// Attach ctx.headers to outgoing API requests, or read ctx.userId
|
|
130
|
+
const userId = ctx.userId;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
\`\`\`
|
|
134
|
+
|
|
135
|
+
### Resolution rules
|
|
136
|
+
|
|
137
|
+
The resolver (\`resolveAuthProvider\`) applies these steps:
|
|
138
|
+
|
|
139
|
+
1. Keep only descriptors where \`enabled !== false\`.
|
|
140
|
+
2. Drop any whose \`hardware\` / \`surfaces\` constraints don't match the current scope. This is how \`db\` is excluded outside \`cloud\` + \`workers/worker\`.
|
|
141
|
+
3. Prefer the descriptor with \`isDefault: true\` (the \`api\` provider).
|
|
142
|
+
4. Otherwise pick the highest \`priority\` (descending).
|
|
143
|
+
|
|
144
|
+
So in CLI/consumer/web scopes the \`api\` provider always wins; on a cloud worker, both are available and \`api\` still wins as the default unless code resolves \`db\` explicitly.
|
|
145
|
+
|
|
146
|
+
## Registration
|
|
147
|
+
|
|
148
|
+
There are no per-provider plugin factories. The auth runtime is registered as a single plugin that contributes the \`auth/provider\` kind plus the built-in \`api\` and \`db\` descriptors:
|
|
149
|
+
|
|
150
|
+
\`\`\`ts
|
|
151
|
+
import { authPlugin } from '@vibesdotdev/auth';
|
|
152
|
+
|
|
153
|
+
await runtime.registerPlugin(authPlugin);
|
|
154
|
+
\`\`\`
|
|
155
|
+
|
|
156
|
+
\`authPlugin\` is the default export of \`@vibesdotdev/auth\`. It declares the \`auth/provider\` kind, registers the resolver and core slice plugins, and on non-cloud scopes also loads the auth CLI plugin.
|
|
157
|
+
|
|
158
|
+
## Custom providers (OIDC / SAML)
|
|
159
|
+
|
|
160
|
+
Custom sign-in providers (distinct from the \`auth/provider\` transport kind above) are modeled by \`CustomAuthProviderSchema\` and resolved through the \`auth/provider-custom\` kind, merged into the sign-in provider list by the auth-provider resolver. See [\`auth.oauth\`](auth.oauth) for configuring OAuth and custom OIDC/SAML sign-in providers.
|
|
161
|
+
|
|
162
|
+
:::card{title="See also"}
|
|
163
|
+
- [\`auth.flows\`](auth.flows) — Authentication flows
|
|
164
|
+
- [\`auth.sessions\`](auth.sessions) — Session management
|
|
165
|
+
- [\`auth.oauth\`](auth.oauth) — OAuth and custom sign-in providers
|
|
166
|
+
:::
|
|
167
|
+
`
|
|
168
|
+
},
|
|
169
|
+
parent: 'auth',
|
|
170
|
+
order: 4,
|
|
171
|
+
tags: ['auth', 'providers', 'runtime-kind', 'resolution'],
|
|
172
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
173
|
+
hardware: ['consumer', 'cloud'],
|
|
174
|
+
enabled: true
|
|
175
|
+
};
|
|
176
|
+
export default descriptor;
|
|
177
|
+
//# sourceMappingURL=auth.providers.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.providers.docs.descriptor.js","sourceRoot":"","sources":["../../src/docs/auth.providers.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,0BAA0B;IACjC,OAAO,EAAE,mFAAmF;IAC5F,IAAI,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JT;KACC;IACD,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,CAAC;IACzD,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flows.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/docs/flows.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,QAAA,MAAM,UAAU,EAAE,mBA6LjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|