@softistx/alxia-react-router 0.0.0-stage → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2085 -2
- package/dist/api-keys/api-keys.d.ts +93 -0
- package/dist/api-keys/api-keys.d.ts.map +1 -0
- package/dist/api-keys/index.d.ts +9 -0
- package/dist/api-keys/index.d.ts.map +1 -0
- package/dist/api-keys/index.js +66 -0
- package/dist/api-keys/index.js.map +10 -0
- package/dist/assets.d.ts +14 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/chunks/index-0786n4qe.js +25 -0
- package/dist/chunks/index-0786n4qe.js.map +10 -0
- package/dist/chunks/index-1nw5yeek.js +169 -0
- package/dist/chunks/index-1nw5yeek.js.map +11 -0
- package/dist/chunks/index-59vhfj6n.js +10 -0
- package/dist/chunks/index-59vhfj6n.js.map +10 -0
- package/dist/chunks/index-5gqcpyyg.js +34 -0
- package/dist/chunks/index-5gqcpyyg.js.map +10 -0
- package/dist/chunks/index-6jf7zpxz.js +119 -0
- package/dist/chunks/index-6jf7zpxz.js.map +11 -0
- package/dist/chunks/index-8as4j8m3.js +340 -0
- package/dist/chunks/index-8as4j8m3.js.map +16 -0
- package/dist/chunks/index-9xv2a8et.js +108 -0
- package/dist/chunks/index-9xv2a8et.js.map +11 -0
- package/dist/chunks/index-ajtvyq35.js +16 -0
- package/dist/chunks/index-ajtvyq35.js.map +10 -0
- package/dist/chunks/index-c55hxgr5.js +124 -0
- package/dist/chunks/index-c55hxgr5.js.map +14 -0
- package/dist/chunks/index-d42p3mdp.js +19 -0
- package/dist/chunks/index-d42p3mdp.js.map +10 -0
- package/dist/chunks/index-gac44rs5.js +42 -0
- package/dist/chunks/index-gac44rs5.js.map +11 -0
- package/dist/chunks/index-j4ktpcke.js +62 -0
- package/dist/chunks/index-j4ktpcke.js.map +10 -0
- package/dist/chunks/index-mscfme4r.js +12 -0
- package/dist/chunks/index-mscfme4r.js.map +10 -0
- package/dist/chunks/index-pghmb2dm.js +30 -0
- package/dist/chunks/index-pghmb2dm.js.map +10 -0
- package/dist/chunks/index-rfr02vg4.js +40 -0
- package/dist/chunks/index-rfr02vg4.js.map +10 -0
- package/dist/chunks/index-sfhshxqz.js +31 -0
- package/dist/chunks/index-sfhshxqz.js.map +10 -0
- package/dist/chunks/index-skwypsjz.js +357 -0
- package/dist/chunks/index-skwypsjz.js.map +12 -0
- package/dist/chunks/index-sxh06ged.js +118 -0
- package/dist/chunks/index-sxh06ged.js.map +11 -0
- package/dist/chunks/index-t2ph23wk.js +96 -0
- package/dist/chunks/index-t2ph23wk.js.map +13 -0
- package/dist/chunks/index-thyabr5n.js +19 -0
- package/dist/chunks/index-thyabr5n.js.map +10 -0
- package/dist/chunks/index-tx36swjx.js +134 -0
- package/dist/chunks/index-tx36swjx.js.map +11 -0
- package/dist/chunks/index-v2z5k640.js +54 -0
- package/dist/chunks/index-v2z5k640.js.map +11 -0
- package/dist/chunks/index-vr82typq.js +23 -0
- package/dist/chunks/index-vr82typq.js.map +11 -0
- package/dist/chunks/index-whj6h5eg.js +9 -0
- package/dist/chunks/index-whj6h5eg.js.map +10 -0
- package/dist/chunks/index-wyypkfdv.js +130 -0
- package/dist/chunks/index-wyypkfdv.js.map +13 -0
- package/dist/chunks/index-xd5aqy3g.js +90 -0
- package/dist/chunks/index-xd5aqy3g.js.map +10 -0
- package/dist/chunks/index-zdbqzcjp.js +97 -0
- package/dist/chunks/index-zdbqzcjp.js.map +12 -0
- package/dist/chunks/index-zyg8amjc.js +23 -0
- package/dist/chunks/index-zyg8amjc.js.map +10 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +215 -0
- package/dist/cli/index.js.map +13 -0
- package/dist/cli/main.d.ts +13 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/reveal.d.ts +18 -0
- package/dist/cli/reveal.d.ts.map +1 -0
- package/dist/cli/template.d.ts +8 -0
- package/dist/cli/template.d.ts.map +1 -0
- package/dist/context.d.ts +104 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/document/index.d.ts +11 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/index.js +19 -0
- package/dist/document/index.js.map +9 -0
- package/dist/document/inline-script.d.ts +27 -0
- package/dist/document/inline-script.d.ts.map +1 -0
- package/dist/document/language-store.d.ts +8 -0
- package/dist/document/language-store.d.ts.map +1 -0
- package/dist/document/nonce.d.ts +34 -0
- package/dist/document/nonce.d.ts.map +1 -0
- package/dist/document/page-language.d.ts +39 -0
- package/dist/document/page-language.d.ts.map +1 -0
- package/dist/document/text-direction.d.ts +10 -0
- package/dist/document/text-direction.d.ts.map +1 -0
- package/dist/entry/abort.d.ts +21 -0
- package/dist/entry/abort.d.ts.map +1 -0
- package/dist/entry/create-entry.d.ts +41 -0
- package/dist/entry/create-entry.d.ts.map +1 -0
- package/dist/entry/index.d.ts +8 -0
- package/dist/entry/index.d.ts.map +1 -0
- package/dist/entry/index.js +154 -0
- package/dist/entry/index.js.map +13 -0
- package/dist/entry/root-data.d.ts +27 -0
- package/dist/entry/root-data.d.ts.map +1 -0
- package/dist/entry/whole-page.d.ts +10 -0
- package/dist/entry/whole-page.d.ts.map +1 -0
- package/dist/errors/api-error.d.ts +117 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-errors.d.ts +122 -0
- package/dist/errors/api-errors.d.ts.map +1 -0
- package/dist/errors/call-failure.d.ts +45 -0
- package/dist/errors/call-failure.d.ts.map +1 -0
- package/dist/errors/catalogue-check.d.ts +24 -0
- package/dist/errors/catalogue-check.d.ts.map +1 -0
- package/dist/errors/catalogue-read.d.ts +33 -0
- package/dist/errors/catalogue-read.d.ts.map +1 -0
- package/dist/errors/catalogue.d.ts +59 -0
- package/dist/errors/catalogue.d.ts.map +1 -0
- package/dist/errors/code-resolver.d.ts +44 -0
- package/dist/errors/code-resolver.d.ts.map +1 -0
- package/dist/errors/cross-site.d.ts +8 -0
- package/dist/errors/cross-site.d.ts.map +1 -0
- package/dist/errors/describe-refusal.d.ts +6 -0
- package/dist/errors/describe-refusal.d.ts.map +1 -0
- package/dist/errors/describe.d.ts +3 -0
- package/dist/errors/describe.d.ts.map +1 -0
- package/dist/errors/fetcher-result.d.ts +33 -0
- package/dist/errors/fetcher-result.d.ts.map +1 -0
- package/dist/errors/field-placement.d.ts +12 -0
- package/dist/errors/field-placement.d.ts.map +1 -0
- package/dist/errors/form-errors.d.ts +8 -0
- package/dist/errors/form-errors.d.ts.map +1 -0
- package/dist/errors/form-refusal.d.ts +25 -0
- package/dist/errors/form-refusal.d.ts.map +1 -0
- package/dist/errors/index.d.ts +21 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +588 -0
- package/dist/errors/index.js.map +26 -0
- package/dist/errors/json-actions.d.ts +38 -0
- package/dist/errors/json-actions.d.ts.map +1 -0
- package/dist/errors/log.d.ts +8 -0
- package/dist/errors/log.d.ts.map +1 -0
- package/dist/errors/message-values.d.ts +11 -0
- package/dist/errors/message-values.d.ts.map +1 -0
- package/dist/errors/messages.d.ts +63 -0
- package/dist/errors/messages.d.ts.map +1 -0
- package/dist/errors/page-path.d.ts +9 -0
- package/dist/errors/page-path.d.ts.map +1 -0
- package/dist/errors/problem-error.d.ts +50 -0
- package/dist/errors/problem-error.d.ts.map +1 -0
- package/dist/errors/provider.d.ts +20 -0
- package/dist/errors/provider.d.ts.map +1 -0
- package/dist/errors/request-id.d.ts +5 -0
- package/dist/errors/request-id.d.ts.map +1 -0
- package/dist/errors/route-error.d.ts +33 -0
- package/dist/errors/route-error.d.ts.map +1 -0
- package/dist/errors/route-refusal.d.ts +20 -0
- package/dist/errors/route-refusal.d.ts.map +1 -0
- package/dist/errors/same-site.d.ts +49 -0
- package/dist/errors/same-site.d.ts.map +1 -0
- package/dist/errors/section-action.d.ts +46 -0
- package/dist/errors/section-action.d.ts.map +1 -0
- package/dist/errors/standard-schema.d.ts +34 -0
- package/dist/errors/standard-schema.d.ts.map +1 -0
- package/dist/errors/submit-form.d.ts +16 -0
- package/dist/errors/submit-form.d.ts.map +1 -0
- package/dist/errors/upstream-headers.d.ts +18 -0
- package/dist/errors/upstream-headers.d.ts.map +1 -0
- package/dist/errors/use-json-fetcher.d.ts +18 -0
- package/dist/errors/use-json-fetcher.d.ts.map +1 -0
- package/dist/fetcher/auth-refusal.d.ts +29 -0
- package/dist/fetcher/auth-refusal.d.ts.map +1 -0
- package/dist/fetcher/index.d.ts +20 -0
- package/dist/fetcher/index.d.ts.map +1 -0
- package/dist/fetcher/index.js +392 -0
- package/dist/fetcher/index.js.map +21 -0
- package/dist/fetcher/section-form.d.ts +24 -0
- package/dist/fetcher/section-form.d.ts.map +1 -0
- package/dist/fetcher/section-reload.d.ts +17 -0
- package/dist/fetcher/section-reload.d.ts.map +1 -0
- package/dist/fetcher/section-save.d.ts +29 -0
- package/dist/fetcher/section-save.d.ts.map +1 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts +57 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-answer.d.ts +16 -0
- package/dist/fetcher/use-fetcher-answer.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-done.d.ts +15 -0
- package/dist/fetcher/use-fetcher-done.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-promise.d.ts +48 -0
- package/dist/fetcher/use-fetcher-promise.d.ts.map +1 -0
- package/dist/fetcher/use-form-refusal.d.ts +20 -0
- package/dist/fetcher/use-form-refusal.d.ts.map +1 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts +20 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts.map +1 -0
- package/dist/fetcher/use-row-save.d.ts +32 -0
- package/dist/fetcher/use-row-save.d.ts.map +1 -0
- package/dist/fetcher/use-section-save.d.ts +46 -0
- package/dist/fetcher/use-section-save.d.ts.map +1 -0
- package/dist/fetcher/use-visible-interval.d.ts +24 -0
- package/dist/fetcher/use-visible-interval.d.ts.map +1 -0
- package/dist/fetcher/use-visible-revalidation.d.ts +10 -0
- package/dist/fetcher/use-visible-revalidation.d.ts.map +1 -0
- package/dist/health.d.ts +21 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/help/check/check.d.ts +35 -0
- package/dist/help/check/check.d.ts.map +1 -0
- package/dist/help/check/index.d.ts +8 -0
- package/dist/help/check/index.d.ts.map +1 -0
- package/dist/help/check/index.js +17 -0
- package/dist/help/check/index.js.map +9 -0
- package/dist/help/check/routes.d.ts +22 -0
- package/dist/help/check/routes.d.ts.map +1 -0
- package/dist/help/guide.d.ts +33 -0
- package/dist/help/guide.d.ts.map +1 -0
- package/dist/help/index.d.ts +16 -0
- package/dist/help/index.d.ts.map +1 -0
- package/dist/help/index.js +192 -0
- package/dist/help/index.js.map +14 -0
- package/dist/help/load.d.ts +39 -0
- package/dist/help/load.d.ts.map +1 -0
- package/dist/help/panel.d.ts +69 -0
- package/dist/help/panel.d.ts.map +1 -0
- package/dist/help/parse-flow.d.ts +27 -0
- package/dist/help/parse-flow.d.ts.map +1 -0
- package/dist/help/react.d.ts +12 -0
- package/dist/help/react.d.ts.map +1 -0
- package/dist/help/resolve.d.ts +24 -0
- package/dist/help/resolve.d.ts.map +1 -0
- package/dist/help/types.d.ts +50 -0
- package/dist/help/types.d.ts.map +1 -0
- package/dist/help/yaml.d.ts +18 -0
- package/dist/help/yaml.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +14 -0
- package/dist/link/index.d.ts +7 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +16 -0
- package/dist/link/index.js.map +10 -0
- package/dist/link/router-link.d.ts +27 -0
- package/dist/link/router-link.d.ts.map +1 -0
- package/dist/lists/connection-page.d.ts +50 -0
- package/dist/lists/connection-page.d.ts.map +1 -0
- package/dist/lists/index.d.ts +13 -0
- package/dist/lists/index.d.ts.map +1 -0
- package/dist/lists/index.js +205 -0
- package/dist/lists/index.js.map +15 -0
- package/dist/lists/newest-first.d.ts +5 -0
- package/dist/lists/newest-first.d.ts.map +1 -0
- package/dist/lists/nodes-of.d.ts +21 -0
- package/dist/lists/nodes-of.d.ts.map +1 -0
- package/dist/lists/or-failed.d.ts +19 -0
- package/dist/lists/or-failed.d.ts.map +1 -0
- package/dist/lists/use-paged-rows.d.ts +40 -0
- package/dist/lists/use-paged-rows.d.ts.map +1 -0
- package/dist/lists/use-same-route-loading.d.ts +8 -0
- package/dist/lists/use-same-route-loading.d.ts.map +1 -0
- package/dist/lists/use-search-change.d.ts +20 -0
- package/dist/lists/use-search-change.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +105 -0
- package/dist/mcp/index.js.map +11 -0
- package/dist/mcp/mcp-relay.d.ts +58 -0
- package/dist/mcp/mcp-relay.d.ts.map +1 -0
- package/dist/mcp/relay.d.ts +38 -0
- package/dist/mcp/relay.d.ts.map +1 -0
- package/dist/media/client/error.d.ts +29 -0
- package/dist/media/client/error.d.ts.map +1 -0
- package/dist/media/client/index.d.ts +8 -0
- package/dist/media/client/index.d.ts.map +1 -0
- package/dist/media/client/index.js +133 -0
- package/dist/media/client/index.js.map +11 -0
- package/dist/media/client/upload.d.ts +32 -0
- package/dist/media/client/upload.d.ts.map +1 -0
- package/dist/media/forward.d.ts +14 -0
- package/dist/media/forward.d.ts.map +1 -0
- package/dist/media/headers.d.ts +11 -0
- package/dist/media/headers.d.ts.map +1 -0
- package/dist/media/index.d.ts +9 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +396 -0
- package/dist/media/index.js.map +16 -0
- package/dist/media/options.d.ts +114 -0
- package/dist/media/options.d.ts.map +1 -0
- package/dist/media/path.d.ts +12 -0
- package/dist/media/path.d.ts.map +1 -0
- package/dist/media/read.d.ts +11 -0
- package/dist/media/read.d.ts.map +1 -0
- package/dist/media/refusal.d.ts +11 -0
- package/dist/media/refusal.d.ts.map +1 -0
- package/dist/media/respond.d.ts +8 -0
- package/dist/media/respond.d.ts.map +1 -0
- package/dist/media/write.d.ts +13 -0
- package/dist/media/write.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +9 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +48 -0
- package/dist/navigation/index.js.map +11 -0
- package/dist/navigation/use-focus-on-navigate.d.ts +16 -0
- package/dist/navigation/use-focus-on-navigate.d.ts.map +1 -0
- package/dist/navigation/use-route-transition.d.ts +19 -0
- package/dist/navigation/use-route-transition.d.ts.map +1 -0
- package/dist/nonce.d.ts +16 -0
- package/dist/nonce.d.ts.map +1 -0
- package/dist/oauth/answer.d.ts +33 -0
- package/dist/oauth/answer.d.ts.map +1 -0
- package/dist/oauth/binding.d.ts +43 -0
- package/dist/oauth/binding.d.ts.map +1 -0
- package/dist/oauth/consent.d.ts +134 -0
- package/dist/oauth/consent.d.ts.map +1 -0
- package/dist/oauth/grants.d.ts +88 -0
- package/dist/oauth/grants.d.ts.map +1 -0
- package/dist/oauth/index.d.ts +16 -0
- package/dist/oauth/index.d.ts.map +1 -0
- package/dist/oauth/index.js +207 -0
- package/dist/oauth/index.js.map +12 -0
- package/dist/oauth/model.d.ts +13 -0
- package/dist/oauth/model.d.ts.map +1 -0
- package/dist/oauth/react/index.d.ts +7 -0
- package/dist/oauth/react/index.d.ts.map +1 -0
- package/dist/oauth/react/index.js +99 -0
- package/dist/oauth/react/index.js.map +10 -0
- package/dist/oauth/react/use-consent.d.ts +52 -0
- package/dist/oauth/react/use-consent.d.ts.map +1 -0
- package/dist/oidc/dpop.d.ts +80 -0
- package/dist/oidc/dpop.d.ts.map +1 -0
- package/dist/oidc/errors.d.ts +16 -0
- package/dist/oidc/errors.d.ts.map +1 -0
- package/dist/oidc/flow.d.ts +59 -0
- package/dist/oidc/flow.d.ts.map +1 -0
- package/dist/oidc/index.d.ts +11 -0
- package/dist/oidc/index.d.ts.map +1 -0
- package/dist/oidc/index.js +742 -0
- package/dist/oidc/index.js.map +15 -0
- package/dist/oidc/oidc.d.ts +132 -0
- package/dist/oidc/oidc.d.ts.map +1 -0
- package/dist/oidc/revoke.d.ts +28 -0
- package/dist/oidc/revoke.d.ts.map +1 -0
- package/dist/oidc/seal.d.ts +20 -0
- package/dist/oidc/seal.d.ts.map +1 -0
- package/dist/pwa/build/build-worker.d.ts +41 -0
- package/dist/pwa/build/build-worker.d.ts.map +1 -0
- package/dist/pwa/build/index.d.ts +9 -0
- package/dist/pwa/build/index.d.ts.map +1 -0
- package/dist/pwa/build/index.js +9 -0
- package/dist/pwa/build/index.js.map +9 -0
- package/dist/pwa/build/precache.d.ts +17 -0
- package/dist/pwa/build/precache.d.ts.map +1 -0
- package/dist/pwa/index.d.ts +16 -0
- package/dist/pwa/index.d.ts.map +1 -0
- package/dist/pwa/index.js +110 -0
- package/dist/pwa/index.js.map +12 -0
- package/dist/pwa/model/caching.d.ts +46 -0
- package/dist/pwa/model/caching.d.ts.map +1 -0
- package/dist/pwa/model/clear-app-caches.d.ts +9 -0
- package/dist/pwa/model/clear-app-caches.d.ts.map +1 -0
- package/dist/pwa/model/font-precache.d.ts +15 -0
- package/dist/pwa/model/font-precache.d.ts.map +1 -0
- package/dist/pwa/model/manifest.d.ts +80 -0
- package/dist/pwa/model/manifest.d.ts.map +1 -0
- package/dist/pwa/model/precache-list.d.ts +40 -0
- package/dist/pwa/model/precache-list.d.ts.map +1 -0
- package/dist/pwa/model/registration.d.ts +39 -0
- package/dist/pwa/model/registration.d.ts.map +1 -0
- package/dist/pwa/model/start-service-worker.d.ts +24 -0
- package/dist/pwa/model/start-service-worker.d.ts.map +1 -0
- package/dist/pwa/model/storable.d.ts +8 -0
- package/dist/pwa/model/storable.d.ts.map +1 -0
- package/dist/pwa/model/theme-color.d.ts +20 -0
- package/dist/pwa/model/theme-color.d.ts.map +1 -0
- package/dist/pwa/model/update-notice.d.ts +38 -0
- package/dist/pwa/model/update-notice.d.ts.map +1 -0
- package/dist/pwa/model/worker-contract.d.ts +61 -0
- package/dist/pwa/model/worker-contract.d.ts.map +1 -0
- package/dist/pwa/react/index.d.ts +9 -0
- package/dist/pwa/react/index.d.ts.map +1 -0
- package/dist/pwa/react/index.js +75 -0
- package/dist/pwa/react/index.js.map +13 -0
- package/dist/pwa/react/use-online.d.ts +6 -0
- package/dist/pwa/react/use-online.d.ts.map +1 -0
- package/dist/pwa/react/use-service-worker.d.ts +33 -0
- package/dist/pwa/react/use-service-worker.d.ts.map +1 -0
- package/dist/pwa/react/use-update-notice.d.ts +14 -0
- package/dist/pwa/react/use-update-notice.d.ts.map +1 -0
- package/dist/pwa/server/index.d.ts +7 -0
- package/dist/pwa/server/index.d.ts.map +1 -0
- package/dist/pwa/server/index.js +18 -0
- package/dist/pwa/server/index.js.map +10 -0
- package/dist/pwa/server/no-cache.d.ts +22 -0
- package/dist/pwa/server/no-cache.d.ts.map +1 -0
- package/dist/pwa/worker/index.d.ts +9 -0
- package/dist/pwa/worker/index.d.ts.map +1 -0
- package/dist/pwa/worker/index.js +144 -0
- package/dist/pwa/worker/index.js.map +12 -0
- package/dist/pwa/worker/injected.d.ts +15 -0
- package/dist/pwa/worker/injected.d.ts.map +1 -0
- package/dist/pwa/worker/plan.d.ts +65 -0
- package/dist/pwa/worker/plan.d.ts.map +1 -0
- package/dist/pwa/worker/scope.d.ts +18 -0
- package/dist/pwa/worker/scope.d.ts.map +1 -0
- package/dist/pwa/worker/start-worker.d.ts +17 -0
- package/dist/pwa/worker/start-worker.d.ts.map +1 -0
- package/dist/react-router.d.ts +68 -0
- package/dist/react-router.d.ts.map +1 -0
- package/dist/server.d.ts +127 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/session/codes.d.ts +9 -0
- package/dist/session/codes.d.ts.map +1 -0
- package/dist/session/cookies.d.ts +128 -0
- package/dist/session/cookies.d.ts.map +1 -0
- package/dist/session/flow-types.d.ts +235 -0
- package/dist/session/flow-types.d.ts.map +1 -0
- package/dist/session/guard.d.ts +10 -0
- package/dist/session/guard.d.ts.map +1 -0
- package/dist/session/index.d.ts +22 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +1090 -0
- package/dist/session/index.js.map +27 -0
- package/dist/session/land.d.ts +28 -0
- package/dist/session/land.d.ts.map +1 -0
- package/dist/session/link-json.d.ts +22 -0
- package/dist/session/link-json.d.ts.map +1 -0
- package/dist/session/link-land.d.ts +20 -0
- package/dist/session/link-land.d.ts.map +1 -0
- package/dist/session/link-token.d.ts +24 -0
- package/dist/session/link-token.d.ts.map +1 -0
- package/dist/session/link-types.d.ts +142 -0
- package/dist/session/link-types.d.ts.map +1 -0
- package/dist/session/links.d.ts +14 -0
- package/dist/session/links.d.ts.map +1 -0
- package/dist/session/model/index.d.ts +8 -0
- package/dist/session/model/index.d.ts.map +1 -0
- package/dist/session/model/index.js +35 -0
- package/dist/session/model/index.js.map +9 -0
- package/dist/session/model/link-post.d.ts +35 -0
- package/dist/session/model/link-post.d.ts.map +1 -0
- package/dist/session/model/paths.d.ts +24 -0
- package/dist/session/model/paths.d.ts.map +1 -0
- package/dist/session/model/safe-next.d.ts +15 -0
- package/dist/session/model/safe-next.d.ts.map +1 -0
- package/dist/session/model/second-factor.d.ts +16 -0
- package/dist/session/model/second-factor.d.ts.map +1 -0
- package/dist/session/model/site-path.d.ts +10 -0
- package/dist/session/model/site-path.d.ts.map +1 -0
- package/dist/session/model/step-up-answers.d.ts +45 -0
- package/dist/session/model/step-up-answers.d.ts.map +1 -0
- package/dist/session/model/step-up-props.d.ts +22 -0
- package/dist/session/model/step-up-props.d.ts.map +1 -0
- package/dist/session/model/step-up.d.ts +48 -0
- package/dist/session/model/step-up.d.ts.map +1 -0
- package/dist/session/react/index.d.ts +13 -0
- package/dist/session/react/index.d.ts.map +1 -0
- package/dist/session/react/index.js +196 -0
- package/dist/session/react/index.js.map +14 -0
- package/dist/session/react/step-up/answers.d.ts +9 -0
- package/dist/session/react/step-up/answers.d.ts.map +1 -0
- package/dist/session/react/step-up/dialog-props.d.ts +27 -0
- package/dist/session/react/step-up/dialog-props.d.ts.map +1 -0
- package/dist/session/react/step-up/index.d.ts +7 -0
- package/dist/session/react/step-up/index.d.ts.map +1 -0
- package/dist/session/react/step-up/pending-runs.d.ts +21 -0
- package/dist/session/react/step-up/pending-runs.d.ts.map +1 -0
- package/dist/session/react/step-up/phase.d.ts +8 -0
- package/dist/session/react/step-up/phase.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts +59 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts +70 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up.d.ts +51 -0
- package/dist/session/react/step-up/use-step-up.d.ts.map +1 -0
- package/dist/session/react/use-code-field.d.ts +37 -0
- package/dist/session/react/use-code-field.d.ts.map +1 -0
- package/dist/session/react/use-link-fragment.d.ts +22 -0
- package/dist/session/react/use-link-fragment.d.ts.map +1 -0
- package/dist/session/react/use-link-param.d.ts +26 -0
- package/dist/session/react/use-link-param.d.ts.map +1 -0
- package/dist/session/react/use-link-post.d.ts +39 -0
- package/dist/session/react/use-link-post.d.ts.map +1 -0
- package/dist/session/react/use-sign-out.d.ts +46 -0
- package/dist/session/react/use-sign-out.d.ts.map +1 -0
- package/dist/session/second-factor.d.ts +22 -0
- package/dist/session/second-factor.d.ts.map +1 -0
- package/dist/session/serialize.d.ts +42 -0
- package/dist/session/serialize.d.ts.map +1 -0
- package/dist/session/sign-in.d.ts +19 -0
- package/dist/session/sign-in.d.ts.map +1 -0
- package/dist/session/signed.d.ts +44 -0
- package/dist/session/signed.d.ts.map +1 -0
- package/dist/session/social-flow.d.ts +22 -0
- package/dist/session/social-flow.d.ts.map +1 -0
- package/dist/session/social-land.d.ts +31 -0
- package/dist/session/social-land.d.ts.map +1 -0
- package/dist/session/social-types.d.ts +136 -0
- package/dist/session/social-types.d.ts.map +1 -0
- package/dist/session/social.d.ts +32 -0
- package/dist/session/social.d.ts.map +1 -0
- package/dist/session/step-up-codes.d.ts +9 -0
- package/dist/session/step-up-codes.d.ts.map +1 -0
- package/dist/session/step-up-signed-out.d.ts +21 -0
- package/dist/session/step-up-signed-out.d.ts.map +1 -0
- package/dist/session/step-up-types.d.ts +127 -0
- package/dist/session/step-up-types.d.ts.map +1 -0
- package/dist/session/step-up.d.ts +17 -0
- package/dist/session/step-up.d.ts.map +1 -0
- package/dist/session/step.d.ts +22 -0
- package/dist/session/step.d.ts.map +1 -0
- package/dist/session/throttle.d.ts +73 -0
- package/dist/session/throttle.d.ts.map +1 -0
- package/dist/session/timed-wait.d.ts +4 -0
- package/dist/session/timed-wait.d.ts.map +1 -0
- package/dist/session/viewer.d.ts +34 -0
- package/dist/session/viewer.d.ts.map +1 -0
- package/dist/subscription/documents.d.ts +3 -0
- package/dist/subscription/documents.d.ts.map +1 -0
- package/dist/subscription/index.d.ts +7 -0
- package/dist/subscription/index.d.ts.map +1 -0
- package/dist/subscription/index.js +359 -0
- package/dist/subscription/index.js.map +14 -0
- package/dist/subscription/proxy.d.ts +54 -0
- package/dist/subscription/proxy.d.ts.map +1 -0
- package/dist/subscription/react/backoff.d.ts +8 -0
- package/dist/subscription/react/backoff.d.ts.map +1 -0
- package/dist/subscription/react/classify.d.ts +15 -0
- package/dist/subscription/react/classify.d.ts.map +1 -0
- package/dist/subscription/react/controller.d.ts +40 -0
- package/dist/subscription/react/controller.d.ts.map +1 -0
- package/dist/subscription/react/fake-timers.d.ts +8 -0
- package/dist/subscription/react/fake-timers.d.ts.map +1 -0
- package/dist/subscription/react/index.d.ts +15 -0
- package/dist/subscription/react/index.d.ts.map +1 -0
- package/dist/subscription/react/index.js +227 -0
- package/dist/subscription/react/index.js.map +17 -0
- package/dist/subscription/react/reconnect.d.ts +9 -0
- package/dist/subscription/react/reconnect.d.ts.map +1 -0
- package/dist/subscription/react/scheduler.d.ts +13 -0
- package/dist/subscription/react/scheduler.d.ts.map +1 -0
- package/dist/subscription/react/timers.d.ts +7 -0
- package/dist/subscription/react/timers.d.ts.map +1 -0
- package/dist/subscription/react/use-live-subscription.d.ts +36 -0
- package/dist/subscription/react/use-live-subscription.d.ts.map +1 -0
- package/dist/subscription/react/versions.d.ts +6 -0
- package/dist/subscription/react/versions.d.ts.map +1 -0
- package/dist/subscription/read.d.ts +17 -0
- package/dist/subscription/read.d.ts.map +1 -0
- package/dist/subscription/refusal.d.ts +11 -0
- package/dist/subscription/refusal.d.ts.map +1 -0
- package/dist/subscription/relay.d.ts +16 -0
- package/dist/subscription/relay.d.ts.map +1 -0
- package/dist/vite/bun.d.ts +21 -0
- package/dist/vite/bun.d.ts.map +1 -0
- package/dist/vite/bundle.d.ts +33 -0
- package/dist/vite/bundle.d.ts.map +1 -0
- package/dist/vite/compress.d.ts +18 -0
- package/dist/vite/compress.d.ts.map +1 -0
- package/dist/vite/config.d.ts +33 -0
- package/dist/vite/config.d.ts.map +1 -0
- package/dist/vite/dev.d.ts +28 -0
- package/dist/vite/dev.d.ts.map +1 -0
- package/dist/vite/entry.d.ts +20 -0
- package/dist/vite/entry.d.ts.map +1 -0
- package/dist/vite/hosts.d.ts +16 -0
- package/dist/vite/hosts.d.ts.map +1 -0
- package/dist/vite/index.d.ts +68 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +635 -0
- package/dist/vite/index.js.map +22 -0
- package/dist/vite/inline.d.ts +18 -0
- package/dist/vite/inline.d.ts.map +1 -0
- package/dist/vite/node.d.ts +16 -0
- package/dist/vite/node.d.ts.map +1 -0
- package/dist/vite/preview.d.ts +8 -0
- package/dist/vite/preview.d.ts.map +1 -0
- package/dist/vite/runtime.d.ts +8 -0
- package/dist/vite/runtime.d.ts.map +1 -0
- package/dist/vite/socket.d.ts +75 -0
- package/dist/vite/socket.d.ts.map +1 -0
- package/dist/vite/worker.d.ts +16 -0
- package/dist/vite/worker.d.ts.map +1 -0
- package/dist/with-alxia.d.ts +36 -0
- package/dist/with-alxia.d.ts.map +1 -0
- package/docs/README.md +42 -0
- package/docs/guide/api-keys.md +216 -0
- package/docs/guide/beside-the-pages.md +201 -0
- package/docs/guide/csp-nonce.md +166 -0
- package/docs/guide/customising-the-server.md +324 -0
- package/docs/guide/deploying.md +102 -0
- package/docs/guide/document.md +334 -0
- package/docs/guide/errors.md +1147 -0
- package/docs/guide/fetcher.md +355 -0
- package/docs/guide/getting-started.md +112 -0
- package/docs/guide/help.md +325 -0
- package/docs/guide/how-it-works.md +274 -0
- package/docs/guide/link.md +32 -0
- package/docs/guide/lists.md +225 -0
- package/docs/guide/mcp.md +173 -0
- package/docs/guide/media.md +273 -0
- package/docs/guide/navigation.md +52 -0
- package/docs/guide/oauth.md +342 -0
- package/docs/guide/oidc.md +262 -0
- package/docs/guide/openapi.md +51 -0
- package/docs/guide/pwa.md +670 -0
- package/docs/guide/session.md +2105 -0
- package/docs/guide/subscriptions.md +211 -0
- package/docs/guide/testing.md +42 -0
- package/docs/guide/typing-the-loaders.md +311 -0
- package/docs/guide.md +82 -0
- package/docs/roadmap.md +474 -0
- package/docs/troubleshooting.md +3837 -0
- package/package.json +301 -5
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFetcherAnswer2
|
|
3
|
+
} from "../../chunks/index-zyg8amjc.js";
|
|
4
|
+
import {
|
|
5
|
+
useStepUpReplay2
|
|
6
|
+
} from "../../chunks/index-8as4j8m3.js";
|
|
7
|
+
|
|
8
|
+
// src/oauth/react/use-consent.ts
|
|
9
|
+
import { useRef, useState } from "react";
|
|
10
|
+
import { useFetcher } from "react-router";
|
|
11
|
+
function boundOf(value) {
|
|
12
|
+
if (typeof value !== "object" || value === null)
|
|
13
|
+
return;
|
|
14
|
+
const { type, id } = value;
|
|
15
|
+
return typeof type === "string" && type !== "" && typeof id === "string" && id !== "" ? { type, id } : undefined;
|
|
16
|
+
}
|
|
17
|
+
function useConsent(requestId, { go, action, request, confirm }) {
|
|
18
|
+
const fetcher = useFetcher({
|
|
19
|
+
key: `oauth-consent-${requestId}`
|
|
20
|
+
});
|
|
21
|
+
const busy = fetcher.state !== "idle";
|
|
22
|
+
const last = useRef(undefined);
|
|
23
|
+
const lastBound = useRef(undefined);
|
|
24
|
+
const [error, setError] = useState(undefined);
|
|
25
|
+
const [expired, setExpired] = useState(false);
|
|
26
|
+
const [leaving, setLeaving] = useState(false);
|
|
27
|
+
const [shownFor, setShownFor] = useState(requestId);
|
|
28
|
+
if (shownFor !== requestId) {
|
|
29
|
+
setShownFor(requestId);
|
|
30
|
+
setError(undefined);
|
|
31
|
+
setExpired(false);
|
|
32
|
+
setLeaving(false);
|
|
33
|
+
last.current = undefined;
|
|
34
|
+
lastBound.current = undefined;
|
|
35
|
+
}
|
|
36
|
+
const send = (intent) => {
|
|
37
|
+
const bound = intent === "approve" ? lastBound.current : undefined;
|
|
38
|
+
return fetcher.submit(bound ? { intent, id: requestId, bound: { type: bound.type, id: bound.id } } : { intent, id: requestId }, {
|
|
39
|
+
method: "post",
|
|
40
|
+
encType: "application/json",
|
|
41
|
+
...action ? { action } : {}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const decide = (intent, bound) => {
|
|
45
|
+
if (busy || leaving)
|
|
46
|
+
return;
|
|
47
|
+
last.current = intent;
|
|
48
|
+
lastBound.current = boundOf(bound);
|
|
49
|
+
setError(undefined);
|
|
50
|
+
send(intent);
|
|
51
|
+
};
|
|
52
|
+
const latest = useFetcherAnswer2(fetcher, (answer) => {
|
|
53
|
+
if (!answer.ok) {
|
|
54
|
+
if (answer.stepUp)
|
|
55
|
+
return;
|
|
56
|
+
last.current = undefined;
|
|
57
|
+
if (answer.expired)
|
|
58
|
+
setExpired(true);
|
|
59
|
+
else
|
|
60
|
+
setError(answer.error);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
setLeaving(true);
|
|
64
|
+
(go ?? ((url) => window.location.assign(url)))(answer.redirectTo);
|
|
65
|
+
});
|
|
66
|
+
const stepUp = useStepUpReplay2({
|
|
67
|
+
answer: latest,
|
|
68
|
+
action: last.current,
|
|
69
|
+
replay() {
|
|
70
|
+
if (last.current)
|
|
71
|
+
send(last.current);
|
|
72
|
+
},
|
|
73
|
+
spendsCode: () => false,
|
|
74
|
+
request,
|
|
75
|
+
confirm
|
|
76
|
+
});
|
|
77
|
+
const { dialogProps } = stepUp;
|
|
78
|
+
const pending = busy || leaving || dialogProps.open;
|
|
79
|
+
return {
|
|
80
|
+
approve: (bound) => decide("approve", bound),
|
|
81
|
+
deny: () => decide("deny"),
|
|
82
|
+
pending: pending ? last.current ?? true : false,
|
|
83
|
+
expired,
|
|
84
|
+
error,
|
|
85
|
+
dialogProps: {
|
|
86
|
+
...dialogProps,
|
|
87
|
+
onCancel() {
|
|
88
|
+
dialogProps.onCancel();
|
|
89
|
+
last.current = undefined;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
useConsent
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
//# debugId=D21D411440E0A01C64756E2164756E21
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/oauth/react/use-consent.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { useRef, useState } from 'react';\nimport { useFetcher } from 'react-router';\nimport { useFetcherAnswer } from '../../fetcher/use-fetcher-answer';\nimport {\n\ttype StepUpReplayOptions,\n\tuseStepUpReplay,\n} from '../../session/react/step-up';\nimport type {\n\tConsentAnswer,\n\tConsentBound,\n\tConsentDecisionIntent,\n} from '../answer';\n\n/**\n * `bound` when it is one: `approve` given straight to `onClick` receives\n * the click event, which binds nothing.\n * Kept twice: `../consent.ts` has the server's copy, which refuses what this\n * one drops; `/oauth/react` shares no chunk with `/oauth`.\n */\nfunction boundOf(value: unknown): ConsentBound | undefined {\n\tif (typeof value !== 'object' || value === null) return undefined;\n\tconst { type, id } = value as { type?: unknown; id?: unknown };\n\treturn typeof type === 'string' &&\n\t\ttype !== '' &&\n\t\ttypeof id === 'string' &&\n\t\tid !== ''\n\t\t? { type, id }\n\t\t: undefined;\n}\n\nexport interface UseConsentOptions\n\textends Pick<\n\t\tStepUpReplayOptions<ConsentDecisionIntent>,\n\t\t'request' | 'confirm'\n\t> {\n\t/**\n\t * Where the browser goes once a decision lands. A hard navigation by\n\t * default (`window.location.assign`): the callback is another site's.\n\t * A parameter so a test can watch it.\n\t */\n\tgo?(url: string): void;\n\t/** The route whose action decides, when it is not the page's own. */\n\taction?: string;\n}\n\n/**\n * The decision of a consent screen, posted as JSON to the page's action\n * (`oauthConsent().action`). A session not confirmed lately opens the shared\n * step-up (`useStepUpReplay`, nothing spent) and the decision goes again by\n * itself; a decision that lands sends the browser to the client's callback\n * (`go`), and the card stays pending until the page is left. A request the\n * API no longer knows is `expired`; any other refusal is the `error`.\n *\n * `approve(bound)` posts what the page's picker chose (one of the loader's\n * `choices`), and the step-up's replay sends it again.\n *\n * @example\n * const { approve, deny, pending, expired, error, dialogProps } =\n * \tuseConsent(request.id, { request: stepUpRequest, confirm: stepUpConfirm });\n * <Button onClick={() => approve({ type: 'tenant', id: chosen })}>Allow</Button>\n */\nexport function useConsent(\n\trequestId: string,\n\t{ go, action, request, confirm }: UseConsentOptions,\n) {\n\tconst fetcher = useFetcher<ConsentAnswer>({\n\t\tkey: `oauth-consent-${requestId}`,\n\t});\n\tconst busy = fetcher.state !== 'idle';\n\tconst last = useRef<ConsentDecisionIntent | undefined>(undefined);\n\t// The picker's choice of the decision in flight, sent again by the replay.\n\tconst lastBound = useRef<ConsentBound | undefined>(undefined);\n\tconst [error, setError] = useState<string | undefined>(undefined);\n\tconst [expired, setExpired] = useState(false);\n\tconst [leaving, setLeaving] = useState(false);\n\n\t// Another request in the same mounted route starts from a clean card.\n\tconst [shownFor, setShownFor] = useState(requestId);\n\tif (shownFor !== requestId) {\n\t\tsetShownFor(requestId);\n\t\tsetError(undefined);\n\t\tsetExpired(false);\n\t\tsetLeaving(false);\n\t\tlast.current = undefined;\n\t\tlastBound.current = undefined;\n\t}\n\n\tconst send = (intent: ConsentDecisionIntent) => {\n\t\tconst bound = intent === 'approve' ? lastBound.current : undefined;\n\t\treturn fetcher.submit(\n\t\t\t// a literal, not the `ConsentBound` interface: a JSON body needs an index signature\n\t\t\tbound\n\t\t\t\t? { intent, id: requestId, bound: { type: bound.type, id: bound.id } }\n\t\t\t\t: { intent, id: requestId },\n\t\t\t{\n\t\t\t\tmethod: 'post',\n\t\t\t\tencType: 'application/json',\n\t\t\t\t...(action ? { action } : {}),\n\t\t\t},\n\t\t);\n\t};\n\n\tconst decide = (intent: ConsentDecisionIntent, bound?: unknown) => {\n\t\tif (busy || leaving) return;\n\t\tlast.current = intent;\n\t\tlastBound.current = boundOf(bound);\n\t\tsetError(undefined);\n\t\tvoid send(intent);\n\t};\n\n\tconst latest = useFetcherAnswer(fetcher, (answer) => {\n\t\tif (!answer.ok) {\n\t\t\tif (answer.stepUp) return; // the dialog asks; `replay` sends again\n\t\t\tlast.current = undefined;\n\t\t\tif (answer.expired) setExpired(true);\n\t\t\telse setError(answer.error);\n\t\t\treturn;\n\t\t}\n\t\tsetLeaving(true);\n\t\t(go ?? ((url) => window.location.assign(url)))(answer.redirectTo);\n\t});\n\n\tconst stepUp = useStepUpReplay<ConsentDecisionIntent>({\n\t\tanswer: latest,\n\t\taction: last.current,\n\t\treplay() {\n\t\t\tif (last.current) void send(last.current);\n\t\t},\n\t\t// A decision carries no one-time code: nothing was spent.\n\t\tspendsCode: () => false,\n\t\trequest,\n\t\tconfirm,\n\t});\n\n\tconst { dialogProps } = stepUp;\n\t// `last` is a ref, but each write sits beside a state change or a fetcher\n\t// transition, so a render follows it.\n\tconst pending = busy || leaving || dialogProps.open;\n\treturn {\n\t\t/** Allows the client; `bound`, the picker's choice, binds the grant to it. */\n\t\tapprove: (bound?: ConsentBound) => decide('approve', bound),\n\t\tdeny: () => decide('deny'),\n\t\t/** What the card spins: the decision in flight, held until the page is left. */\n\t\tpending: pending ? (last.current ?? true) : (false as const),\n\t\texpired,\n\t\terror,\n\t\t/** The step-up dialog's props; cancelling it frees the card. */\n\t\tdialogProps: {\n\t\t\t...dialogProps,\n\t\t\tonCancel() {\n\t\t\t\tdialogProps.onCancel();\n\t\t\t\tlast.current = undefined;\n\t\t\t},\n\t\t},\n\t};\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;AAAA;AACA;AAkBA,SAAS,OAAO,CAAC,OAA0C;AAAA,EAC1D,IAAI,OAAO,UAAU,YAAY,UAAU;AAAA,IAAM;AAAA,EACjD,QAAQ,MAAM,OAAO;AAAA,EACrB,OAAO,OAAO,SAAS,YACtB,SAAS,MACT,OAAO,OAAO,YACd,OAAO,KACL,EAAE,MAAM,GAAG,IACX;AAAA;AAkCG,SAAS,UAAU,CACzB,aACE,IAAI,QAAQ,SAAS,WACtB;AAAA,EACD,MAAM,UAAU,WAA0B;AAAA,IACzC,KAAK,iBAAiB;AAAA,EACvB,CAAC;AAAA,EACD,MAAM,OAAO,QAAQ,UAAU;AAAA,EAC/B,MAAM,OAAO,OAA0C,SAAS;AAAA,EAEhE,MAAM,YAAY,OAAiC,SAAS;AAAA,EAC5D,OAAO,OAAO,YAAY,SAA6B,SAAS;AAAA,EAChE,OAAO,SAAS,cAAc,SAAS,KAAK;AAAA,EAC5C,OAAO,SAAS,cAAc,SAAS,KAAK;AAAA,EAG5C,OAAO,UAAU,eAAe,SAAS,SAAS;AAAA,EAClD,IAAI,aAAa,WAAW;AAAA,IAC3B,YAAY,SAAS;AAAA,IACrB,SAAS,SAAS;AAAA,IAClB,WAAW,KAAK;AAAA,IAChB,WAAW,KAAK;AAAA,IAChB,KAAK,UAAU;AAAA,IACf,UAAU,UAAU;AAAA,EACrB;AAAA,EAEA,MAAM,OAAO,CAAC,WAAkC;AAAA,IAC/C,MAAM,QAAQ,WAAW,YAAY,UAAU,UAAU;AAAA,IACzD,OAAO,QAAQ,OAEd,QACG,EAAE,QAAQ,IAAI,WAAW,OAAO,EAAE,MAAM,MAAM,MAAM,IAAI,MAAM,GAAG,EAAE,IACnE,EAAE,QAAQ,IAAI,UAAU,GAC3B;AAAA,MACC,QAAQ;AAAA,MACR,SAAS;AAAA,SACL,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,IAC5B,CACD;AAAA;AAAA,EAGD,MAAM,SAAS,CAAC,QAA+B,UAAoB;AAAA,IAClE,IAAI,QAAQ;AAAA,MAAS;AAAA,IACrB,KAAK,UAAU;AAAA,IACf,UAAU,UAAU,QAAQ,KAAK;AAAA,IACjC,SAAS,SAAS;AAAA,IACb,KAAK,MAAM;AAAA;AAAA,EAGjB,MAAM,SAAS,kBAAiB,SAAS,CAAC,WAAW;AAAA,IACpD,IAAI,CAAC,OAAO,IAAI;AAAA,MACf,IAAI,OAAO;AAAA,QAAQ;AAAA,MACnB,KAAK,UAAU;AAAA,MACf,IAAI,OAAO;AAAA,QAAS,WAAW,IAAI;AAAA,MACnC;AAAA,QAAK,SAAS,OAAO,KAAK;AAAA,MAC1B;AAAA,IACD;AAAA,IACA,WAAW,IAAI;AAAA,KACd,OAAO,CAAC,QAAQ,OAAO,SAAS,OAAO,GAAG,IAAI,OAAO,UAAU;AAAA,GAChE;AAAA,EAED,MAAM,SAAS,iBAAuC;AAAA,IACrD,QAAQ;AAAA,IACR,QAAQ,KAAK;AAAA,IACb,MAAM,GAAG;AAAA,MACR,IAAI,KAAK;AAAA,QAAc,KAAK,KAAK,OAAO;AAAA;AAAA,IAGzC,YAAY,MAAM;AAAA,IAClB;AAAA,IACA;AAAA,EACD,CAAC;AAAA,EAED,QAAQ,gBAAgB;AAAA,EAGxB,MAAM,UAAU,QAAQ,WAAW,YAAY;AAAA,EAC/C,OAAO;AAAA,IAEN,SAAS,CAAC,UAAyB,OAAO,WAAW,KAAK;AAAA,IAC1D,MAAM,MAAM,OAAO,MAAM;AAAA,IAEzB,SAAS,UAAW,KAAK,WAAW,OAAS;AAAA,IAC7C;AAAA,IACA;AAAA,IAEA,aAAa;AAAA,SACT;AAAA,MACH,QAAQ,GAAG;AAAA,QACV,YAAY,SAAS;AAAA,QACrB,KAAK,UAAU;AAAA;AAAA,IAEjB;AAAA,EACD;AAAA;",
|
|
8
|
+
"debugId": "D21D411440E0A01C64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type StepUpReplayOptions } from '../../session/react/step-up';
|
|
2
|
+
import type { ConsentBound, ConsentDecisionIntent } from '../answer';
|
|
3
|
+
export interface UseConsentOptions extends Pick<StepUpReplayOptions<ConsentDecisionIntent>, 'request' | 'confirm'> {
|
|
4
|
+
/**
|
|
5
|
+
* Where the browser goes once a decision lands. A hard navigation by
|
|
6
|
+
* default (`window.location.assign`): the callback is another site's.
|
|
7
|
+
* A parameter so a test can watch it.
|
|
8
|
+
*/
|
|
9
|
+
go?(url: string): void;
|
|
10
|
+
/** The route whose action decides, when it is not the page's own. */
|
|
11
|
+
action?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The decision of a consent screen, posted as JSON to the page's action
|
|
15
|
+
* (`oauthConsent().action`). A session not confirmed lately opens the shared
|
|
16
|
+
* step-up (`useStepUpReplay`, nothing spent) and the decision goes again by
|
|
17
|
+
* itself; a decision that lands sends the browser to the client's callback
|
|
18
|
+
* (`go`), and the card stays pending until the page is left. A request the
|
|
19
|
+
* API no longer knows is `expired`; any other refusal is the `error`.
|
|
20
|
+
*
|
|
21
|
+
* `approve(bound)` posts what the page's picker chose (one of the loader's
|
|
22
|
+
* `choices`), and the step-up's replay sends it again.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const { approve, deny, pending, expired, error, dialogProps } =
|
|
26
|
+
* useConsent(request.id, { request: stepUpRequest, confirm: stepUpConfirm });
|
|
27
|
+
* <Button onClick={() => approve({ type: 'tenant', id: chosen })}>Allow</Button>
|
|
28
|
+
*/
|
|
29
|
+
export declare function useConsent(requestId: string, { go, action, request, confirm }: UseConsentOptions): {
|
|
30
|
+
/** Allows the client; `bound`, the picker's choice, binds the grant to it. */
|
|
31
|
+
approve: (bound?: ConsentBound) => void;
|
|
32
|
+
deny: () => void;
|
|
33
|
+
/** What the card spins: the decision in flight, held until the page is left. */
|
|
34
|
+
pending: boolean | ConsentDecisionIntent;
|
|
35
|
+
expired: boolean;
|
|
36
|
+
error: string | undefined;
|
|
37
|
+
/** The step-up dialog's props; cancelling it frees the card. */
|
|
38
|
+
dialogProps: {
|
|
39
|
+
onCancel(): void;
|
|
40
|
+
open: boolean;
|
|
41
|
+
phase: import("../../session/react").StepUpDialogPhase;
|
|
42
|
+
via: import("../../session/model").StepUpVia | undefined;
|
|
43
|
+
props: import("../../session/model").StepUpProps;
|
|
44
|
+
message: string | undefined;
|
|
45
|
+
busy: boolean;
|
|
46
|
+
confirming: boolean;
|
|
47
|
+
onRetry(): void;
|
|
48
|
+
onSubmit(code: string): void;
|
|
49
|
+
onResend: (() => void) | undefined;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=use-consent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-consent.d.ts","sourceRoot":"","sources":["../../../src/oauth/react/use-consent.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,mBAAmB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAEX,YAAY,EACZ,qBAAqB,EACrB,MAAM,WAAW,CAAC;AAmBnB,MAAM,WAAW,iBAChB,SAAQ,IAAI,CACX,mBAAmB,CAAC,qBAAqB,CAAC,EAC1C,SAAS,GAAG,SAAS,CACrB;IACD;;;;OAIG;IACH,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CACzB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,iBAAiB;IA4ElD,8EAA8E;sBAC5D,YAAY;;IAE9B,gFAAgF;;;;IAIhF,gEAAgE;;;;;;;;;;;;;;EASjE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type JWK } from 'jose';
|
|
2
|
+
/** The signature algorithms of a DPoP key (RFC 9449). */
|
|
3
|
+
export type DpopAlgorithm = 'ES256' | 'EdDSA';
|
|
4
|
+
/** A DPoP key pair as it is stored with the session: the private JWK and its algorithm. */
|
|
5
|
+
export interface DpopKey {
|
|
6
|
+
readonly alg: DpopAlgorithm;
|
|
7
|
+
readonly jwk: JWK;
|
|
8
|
+
}
|
|
9
|
+
/** What a proof is signed for. */
|
|
10
|
+
export interface DpopProofInput {
|
|
11
|
+
/** The HTTP method of the request the proof goes with. */
|
|
12
|
+
readonly method: string;
|
|
13
|
+
/** The request's URL; its query and fragment are dropped (`htu`). */
|
|
14
|
+
readonly url: string | URL;
|
|
15
|
+
/** The access token the proof is bound to (`ath`), for a call to a resource. */
|
|
16
|
+
readonly accessToken?: string | undefined;
|
|
17
|
+
/** The server's last `DPoP-Nonce`. */
|
|
18
|
+
readonly nonce?: string | undefined;
|
|
19
|
+
/** The clock, in ms; `Date.now` by default. */
|
|
20
|
+
readonly now?: (() => number) | undefined;
|
|
21
|
+
}
|
|
22
|
+
/** A fresh DPoP key pair (ES256 by default), the private half as a JWK. */
|
|
23
|
+
export declare function generateDpopKey(alg?: DpopAlgorithm): Promise<DpopKey>;
|
|
24
|
+
/** The RFC 7638 thumbprint of the key's public half (the `jkt` a server binds a token to). */
|
|
25
|
+
export declare const dpopThumbprint: (key: DpopKey) => Promise<string>;
|
|
26
|
+
/** The URL a proof names: no query, no fragment. */
|
|
27
|
+
export declare function dpopTarget(url: string | URL): string;
|
|
28
|
+
/**
|
|
29
|
+
* A DPoP proof (RFC 9449 section 4): a JWT of type `dpop+jwt` carrying the
|
|
30
|
+
* key's public half, signed for one method and URL, with `ath` when it goes
|
|
31
|
+
* with an access token and `nonce` when the server asked for one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function signDpopProof(key: DpopKey, input: DpopProofInput): Promise<string>;
|
|
34
|
+
/** The last `DPoP-Nonce` each server sent, by origin (RFC 9449 section 8: a nonce belongs to one server). */
|
|
35
|
+
export interface NonceMemory {
|
|
36
|
+
get(url: string | URL): string | undefined;
|
|
37
|
+
set(url: string | URL, nonce: string): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function nonceMemory(): NonceMemory;
|
|
40
|
+
/** Whether a response asks for a (new) nonce: 400 `use_dpop_nonce` at an endpoint, 401 `WWW-Authenticate` at a resource. */
|
|
41
|
+
export declare function wantsNonce(response: Response): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* The DPoP side of a signed-in user: signs proofs for calls to a resource with
|
|
44
|
+
* the session's key, bound to its access token.
|
|
45
|
+
*/
|
|
46
|
+
export interface DpopBinding {
|
|
47
|
+
/** The key's thumbprint (`jkt`). */
|
|
48
|
+
readonly thumbprint: string;
|
|
49
|
+
/** A proof for one call (`htm`, `htu`, `ath`), with the nonce the server last sent unless one is given. */
|
|
50
|
+
proof(input: {
|
|
51
|
+
readonly method: string;
|
|
52
|
+
readonly url: string | URL;
|
|
53
|
+
readonly nonce?: string | undefined;
|
|
54
|
+
}): Promise<string>;
|
|
55
|
+
/** The two headers of a call: `Authorization: DPoP <token>` and `DPoP: <proof>`. */
|
|
56
|
+
headers(input: {
|
|
57
|
+
readonly method: string;
|
|
58
|
+
readonly url: string | URL;
|
|
59
|
+
readonly nonce?: string | undefined;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
readonly authorization: string;
|
|
62
|
+
readonly dpop: string;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* `fetch` with both headers set and the nonce retry: on `401` with
|
|
66
|
+
* `WWW-Authenticate: DPoP error="use_dpop_nonce"` it signs again with the
|
|
67
|
+
* `DPoP-Nonce` header and retries once. Give a string or bytes as `body`,
|
|
68
|
+
* since a stream cannot be sent twice.
|
|
69
|
+
*/
|
|
70
|
+
fetch(input: string | URL, init?: RequestInit): Promise<Response>;
|
|
71
|
+
}
|
|
72
|
+
export declare function dpopBinding(config: {
|
|
73
|
+
readonly key: DpopKey;
|
|
74
|
+
readonly thumbprint: string;
|
|
75
|
+
readonly accessToken: string;
|
|
76
|
+
readonly nonces: NonceMemory;
|
|
77
|
+
readonly fetch: (input: string, init?: RequestInit) => Promise<Response>;
|
|
78
|
+
readonly now: () => number;
|
|
79
|
+
}): DpopBinding;
|
|
80
|
+
//# sourceMappingURL=dpop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dpop.d.ts","sourceRoot":"","sources":["../../src/oidc/dpop.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Why a relying-party step refused. */
|
|
2
|
+
export type OidcErrorCode = 'discovery-failed' | 'missing-challenge' | 'challenge-expired' | 'provider-error' | 'issuer-mismatch' | 'state-mismatch' | 'missing-code' | 'token-exchange-failed' | 'invalid-id-token' | 'nonce-mismatch' | 'refresh-failed' | 'par-failed' | 'revoke-failed' | 'token-cookie-too-large';
|
|
3
|
+
/**
|
|
4
|
+
* What `callback` throws. `headers` holds the `Set-Cookie` that clears the
|
|
5
|
+
* spent challenge: pass it when the route answers the failure, e.g.
|
|
6
|
+
* `redirect('/sign-in?error=' + error.code, { headers: error.headers })`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class OidcError extends Error {
|
|
9
|
+
readonly code: OidcErrorCode;
|
|
10
|
+
readonly headers: Headers;
|
|
11
|
+
readonly name = "OidcError";
|
|
12
|
+
constructor(code: OidcErrorCode, message: string, headers?: Headers, options?: {
|
|
13
|
+
readonly cause?: unknown;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/oidc/errors.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,MAAM,MAAM,aAAa,GACtB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,uBAAuB,GACvB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,wBAAwB,CAAC;AAE5B;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAGlC,QAAQ,CAAC,IAAI,EAAE,aAAa;IAE5B,QAAQ,CAAC,OAAO,EAAE,OAAO;IAJ1B,SAAkB,IAAI,eAAe;gBAE3B,IAAI,EAAE,aAAa,EAC5B,OAAO,EAAE,MAAM,EACN,OAAO,GAAE,OAAuB,EACzC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAIvC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { decodeJwt, type JWTPayload } from 'jose';
|
|
2
|
+
import { type DpopKey, type NonceMemory } from './dpop';
|
|
3
|
+
import { type OidcErrorCode } from './errors';
|
|
4
|
+
/** The fields of the issuer's discovery document the flow reads. */
|
|
5
|
+
export interface DiscoveryDocument {
|
|
6
|
+
readonly issuer: string;
|
|
7
|
+
readonly authorization_endpoint: string;
|
|
8
|
+
readonly token_endpoint: string;
|
|
9
|
+
readonly jwks_uri: string;
|
|
10
|
+
readonly end_session_endpoint?: string;
|
|
11
|
+
readonly revocation_endpoint?: string;
|
|
12
|
+
readonly pushed_authorization_request_endpoint?: string;
|
|
13
|
+
readonly require_pushed_authorization_requests?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** What the issuer's token endpoint answers. */
|
|
16
|
+
export interface TokenResponse {
|
|
17
|
+
readonly access_token: string;
|
|
18
|
+
readonly id_token?: string;
|
|
19
|
+
readonly refresh_token?: string;
|
|
20
|
+
readonly expires_in?: number;
|
|
21
|
+
readonly token_type?: string;
|
|
22
|
+
}
|
|
23
|
+
export type Fetcher = (input: string, init?: RequestInit) => Promise<Response>;
|
|
24
|
+
/** Discovery and the issuer's keys, cached; one per relying party. */
|
|
25
|
+
export declare function issuerClient(config: {
|
|
26
|
+
readonly issuer: string;
|
|
27
|
+
readonly fetch: Fetcher;
|
|
28
|
+
readonly now: () => number;
|
|
29
|
+
readonly algorithms: string[];
|
|
30
|
+
readonly clockToleranceSeconds: number;
|
|
31
|
+
}): {
|
|
32
|
+
discover: () => Promise<DiscoveryDocument>;
|
|
33
|
+
verifyIdToken: (idToken: string, clientId: string, nonce?: string) => Promise<JWTPayload>;
|
|
34
|
+
};
|
|
35
|
+
/** What a request to the issuer needs to carry a DPoP proof: the session's key and the nonces seen. */
|
|
36
|
+
export interface DpopSigning {
|
|
37
|
+
readonly key: DpopKey;
|
|
38
|
+
readonly nonces: NonceMemory;
|
|
39
|
+
readonly now: () => number;
|
|
40
|
+
}
|
|
41
|
+
type Client = {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly secret?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
/** POST to the token endpoint; `error` and `description` come from the issuer. */
|
|
46
|
+
export declare function tokenRequest(fetcher: Fetcher, endpoint: string, client: Client, params: Record<string, string>, code: OidcErrorCode, dpop?: DpopSigning): Promise<TokenResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* POST one token to the revocation endpoint (RFC 7009), with the client's authentication
|
|
49
|
+
* and the DPoP proof when the tokens are bound. Throws `OidcError('revoke-failed')` on a
|
|
50
|
+
* network error or a non-2xx answer.
|
|
51
|
+
*/
|
|
52
|
+
export declare function revokeRequest(fetcher: Fetcher, endpoint: string, client: Client, params: {
|
|
53
|
+
readonly token: string;
|
|
54
|
+
readonly token_type_hint: string;
|
|
55
|
+
}, dpop?: DpopSigning, signal?: AbortSignal): Promise<void>;
|
|
56
|
+
/** POST the authorization request to the pushed authorization request endpoint (RFC 9126): the `request_uri` to redirect with. */
|
|
57
|
+
export declare function pushRequest(fetcher: Fetcher, endpoint: string, client: Client, params: Record<string, string>, dpop?: DpopSigning): Promise<string>;
|
|
58
|
+
export { decodeJwt };
|
|
59
|
+
//# sourceMappingURL=flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/oidc/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,SAAS,EAET,KAAK,UAAU,EAGf,MAAM,MAAM,CAAC;AACd,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAGhB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzD,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,qCAAqC,CAAC,EAAE,MAAM,CAAC;IACxD,QAAQ,CAAC,qCAAqC,CAAC,EAAE,OAAO,CAAC;CACzD;AAED,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAW/E,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,MAAM,EAAE;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACvC;oBAkEqB,OAAO,CAAC,iBAAiB,CAAC;6BAoCrC,MAAM,YACL,MAAM,UACR,MAAM,KACZ,OAAO,CAAC,UAAU,CAAC;EAgDtB;AAED,uGAAuG;AACvG,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;CAC3B;AAED,KAAK,MAAM,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AA2E5E,kFAAkF;AAClF,wBAAsB,YAAY,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,aAAa,EACnB,IAAI,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,aAAa,CAAC,CAyBxB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,EACpE,IAAI,CAAC,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,kIAAkI;AAClI,wBAAsB,WAAW,CAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@softistx/alxia-react-router/oidc`: a BFF as the relying party of an external
|
|
3
|
+
* OpenID Connect issuer (authorization code + PKCE, id token validation,
|
|
4
|
+
* a sealed token cookie, refresh, RP-initiated logout). It imports
|
|
5
|
+
* `react-router`, `/session`'s cookie helpers and `jose` (an optional peer),
|
|
6
|
+
* nothing else.
|
|
7
|
+
*/
|
|
8
|
+
export { type DpopAlgorithm, type DpopBinding, type DpopKey, type DpopProofInput, generateDpopKey, signDpopProof, } from './dpop';
|
|
9
|
+
export { OidcError, type OidcErrorCode } from './errors';
|
|
10
|
+
export { type OidcClient, type OidcOptions, type OidcUser, oidcClient, } from './oidc';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/oidc/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,eAAe,EACf,aAAa,GACb,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACN,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,QAAQ,CAAC"}
|