zudoku 0.0.0-f40ea27 → 0.0.0-f42e3678
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/README.md +2 -2
- package/dist/app/demo.js +16 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +3 -9
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/loader.js +2 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.js +5 -0
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +254 -163
- package/dist/config/validators/InputNavigationSchema.js +4 -4
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +3 -2
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +12 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +19 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +36 -20
- package/dist/config/validators/validate.js +18 -4
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +65 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +8 -6
- package/dist/lib/authentication/authentication.d.ts +2 -0
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/components/SignIn.js +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -2
- package/dist/lib/authentication/providers/openid.js +14 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +11 -6
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +5 -0
- package/dist/lib/components/TopNavigation.js +20 -15
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +21 -13
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +8 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +6 -3
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -2
- package/dist/lib/core/ZudokuContext.js +27 -2
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +6 -4
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +1 -0
- package/dist/lib/plugins/api-keys/index.js +4 -8
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +4 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +43 -11
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/build.js +7 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +9 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +1 -28
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-docs.js +20 -13
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +2 -3
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +88 -49
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +25 -4
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +8 -8
- package/lib/{Button-BE9IVkWV.js → Button-B3o-2Xdf.js} +2 -2
- package/lib/{Button-BE9IVkWV.js.map → Button-B3o-2Xdf.js.map} +1 -1
- package/lib/{Card-DPhGbYUM.js → Card-CMDQUPM4.js} +2 -2
- package/lib/{Card-DPhGbYUM.js.map → Card-CMDQUPM4.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{CodeBlock-DAKxs_Tu.js → CodeBlock-B-G0eKtw.js} +3 -3
- package/lib/{CodeBlock-DAKxs_Tu.js.map → CodeBlock-B-G0eKtw.js.map} +1 -1
- package/lib/{Command-xsbs2uhf.js → Command-BYukybsa.js} +3 -3
- package/lib/{Command-xsbs2uhf.js.map → Command-BYukybsa.js.map} +1 -1
- package/lib/{Dialog-CiIdyz6a.js → Dialog-u9Uz9sTt.js} +5 -5
- package/lib/{Dialog-CiIdyz6a.js.map → Dialog-u9Uz9sTt.js.map} +1 -1
- package/lib/{Drawer-BzkOKwgC.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-BzkOKwgC.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/{MdxPage-swXPJ0gf.js → MdxPage-Bsko6_kb.js} +34 -34
- package/lib/MdxPage-Bsko6_kb.js.map +1 -0
- package/lib/OAuthErrorPage-DJzGiIBt.js +150 -0
- package/lib/OAuthErrorPage-DJzGiIBt.js.map +1 -0
- package/lib/{OasProvider-CDAM3TB1.js → OasProvider-DQQRt3oS.js} +3 -3
- package/lib/{OasProvider-CDAM3TB1.js.map → OasProvider-DQQRt3oS.js.map} +1 -1
- package/lib/{OperationList-C9Hb9ql8.js → OperationList-DpmkHf26.js} +212 -210
- package/lib/OperationList-DpmkHf26.js.map +1 -0
- package/lib/{Pagination-VGlgeCmS.js → Pagination-kqFNgtnI.js} +10 -9
- package/lib/Pagination-kqFNgtnI.js.map +1 -0
- package/lib/{RouteGuard-CbKd7_9h.js → RouteGuard-0wPUKdxJ.js} +166 -165
- package/lib/{RouteGuard-CbKd7_9h.js.map → RouteGuard-0wPUKdxJ.js.map} +1 -1
- package/lib/{SchemaList-BAbh1BXO.js → SchemaList-DS-pMd6B.js} +9 -9
- package/lib/{SchemaList-BAbh1BXO.js.map → SchemaList-DS-pMd6B.js.map} +1 -1
- package/lib/{SchemaView-C2Io712T.js → SchemaView-BnN6WHjw.js} +6 -6
- package/lib/{SchemaView-C2Io712T.js.map → SchemaView-BnN6WHjw.js.map} +1 -1
- package/lib/Select-BmTTKNPp.js +273 -0
- package/lib/Select-BmTTKNPp.js.map +1 -0
- package/lib/SignUp-BwOSCD-6.js +56 -0
- package/lib/SignUp-BwOSCD-6.js.map +1 -0
- package/lib/{Slot-DwZlQ-vX.js → Slot-DAyXieeZ.js} +1634 -1643
- package/lib/Slot-DAyXieeZ.js.map +1 -0
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-BMKR4pl6.js} +757 -757
- package/lib/SyntaxHighlight-BMKR4pl6.js.map +1 -0
- package/lib/{Toc-WCmwFkX-.js → Toc-BKDRCQzU.js} +3 -3
- package/lib/{Toc-WCmwFkX-.js.map → Toc-BKDRCQzU.js.map} +1 -1
- package/lib/ZudokuContext-CLl5w57E.js +1278 -0
- package/lib/ZudokuContext-CLl5w57E.js.map +1 -0
- package/lib/{chunk-DQRVZFIR-DHK7_Ilc.js → chunk-QMGIS6GS-CEOk3lro.js} +3 -3
- package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +1 -0
- package/lib/{circular-B42RaanD.js → circular-8GWQDvCW.js} +2 -2
- package/lib/{circular-B42RaanD.js.map → circular-8GWQDvCW.js.map} +1 -1
- package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/{createServer-BKFsRuuk.js → createServer-BsezSzvV.js} +3398 -3552
- package/lib/createServer-BsezSzvV.js.map +1 -0
- package/lib/errors-Cs7hKmdL.js +45 -0
- package/lib/errors-Cs7hKmdL.js.map +1 -0
- package/lib/hook-DbUCLQNg.js +247 -0
- package/lib/hook-DbUCLQNg.js.map +1 -0
- package/lib/index-A5Qdwj1B.js +4081 -0
- package/lib/index-A5Qdwj1B.js.map +1 -0
- package/lib/{index-B6Re5_cx.js → index-Bg7Js3jB.js} +873 -951
- package/lib/index-Bg7Js3jB.js.map +1 -0
- package/lib/{index-CcV90rin.js → index-BkW9tJ6j.js} +2 -2
- package/lib/{index-CcV90rin.js.map → index-BkW9tJ6j.js.map} +1 -1
- package/lib/index-Bm35Tkgf.js +107 -0
- package/lib/index-Bm35Tkgf.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +10 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +2 -2
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-BIYjecPD.js → useExposedProps-KcgXHKeE.js} +2 -2
- package/lib/{useExposedProps-BIYjecPD.js.map → useExposedProps-KcgXHKeE.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +46 -9883
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +249 -231
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +30 -29
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +17 -16
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +26 -25
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +428 -299
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +123 -118
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +34 -33
- package/src/app/demo.tsx +19 -2
- package/src/app/main.css +26 -5
- package/src/app/main.tsx +6 -14
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +30 -5
- package/src/lib/components/Banner.tsx +0 -1
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/Header.tsx +5 -2
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/MobileTopNavigation.tsx +60 -8
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/Pagination.tsx +1 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +34 -18
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +25 -18
- package/src/lib/components/navigation/NavigationItem.tsx +9 -1
- package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
- package/src/lib/components/navigation/utils.ts +9 -3
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +40 -5
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +12 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +37 -13
- package/src/lib/plugins/api-keys/index.tsx +8 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +4 -3
- package/src/lib/plugins/openapi/OperationList.tsx +4 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +67 -17
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/Alert.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +1 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/lib/Alert-CT_ViLrJ.js +0 -161
- package/lib/Alert-CT_ViLrJ.js.map +0 -1
- package/lib/MdxPage-swXPJ0gf.js.map +0 -1
- package/lib/OperationList-C9Hb9ql8.js.map +0 -1
- package/lib/Pagination-VGlgeCmS.js.map +0 -1
- package/lib/SignUp-5RUdVhnq.js +0 -63
- package/lib/SignUp-5RUdVhnq.js.map +0 -1
- package/lib/Slot-DwZlQ-vX.js.map +0 -1
- package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/cn-wvCW-ho6.js.map +0 -1
- package/lib/createServer-BKFsRuuk.js.map +0 -1
- package/lib/errors-CF2X_x5o.js +0 -78
- package/lib/errors-CF2X_x5o.js.map +0 -1
- package/lib/hook-Bd0yS8M0.js +0 -1503
- package/lib/hook-Bd0yS8M0.js.map +0 -1
- package/lib/index-B6Re5_cx.js.map +0 -1
- package/lib/index-CLy1XyH0.js +0 -3919
- package/lib/index-CLy1XyH0.js.map +0 -1
- package/lib/index-ClhS5TxS.js +0 -107
- package/lib/index-ClhS5TxS.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as Le } from "./invariant-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as D } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { g as Le } from "./invariant-Bm-FVUQE.js";
|
|
3
|
+
import { E as Ue } from "./index-A5Qdwj1B.js";
|
|
4
|
+
import { C as xe } from "./ClientOnly-E7hGysn1.js";
|
|
5
|
+
import { j as Ce } from "./ZudokuContext-CLl5w57E.js";
|
|
6
|
+
import { C as Ie, O as re, A as R } from "./errors-Cs7hKmdL.js";
|
|
7
|
+
import { C as je, O as Oe } from "./OAuthErrorPage-DJzGiIBt.js";
|
|
8
|
+
import { u as S } from "./hook-DbUCLQNg.js";
|
|
9
|
+
var J = { exports: {} }, De = J.exports, oe;
|
|
10
|
+
function Je() {
|
|
8
11
|
return oe || (oe = 1, function(t) {
|
|
9
12
|
(function(e, n) {
|
|
10
13
|
t.exports ? t.exports = n() : e.log = n();
|
|
11
|
-
})(
|
|
14
|
+
})(De, function() {
|
|
12
15
|
var e = function() {
|
|
13
16
|
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
|
|
14
17
|
"trace",
|
|
@@ -17,28 +20,28 @@ function De() {
|
|
|
17
20
|
"warn",
|
|
18
21
|
"error"
|
|
19
22
|
], r = {}, i = null;
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
if (typeof
|
|
23
|
-
return
|
|
23
|
+
function u(l, m) {
|
|
24
|
+
var c = l[m];
|
|
25
|
+
if (typeof c.bind == "function")
|
|
26
|
+
return c.bind(l);
|
|
24
27
|
try {
|
|
25
|
-
return Function.prototype.bind.call(
|
|
28
|
+
return Function.prototype.bind.call(c, l);
|
|
26
29
|
} catch {
|
|
27
30
|
return function() {
|
|
28
|
-
return Function.prototype.apply.apply(
|
|
31
|
+
return Function.prototype.apply.apply(c, [l, arguments]);
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function d() {
|
|
33
36
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
34
37
|
}
|
|
35
38
|
function y(l) {
|
|
36
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ?
|
|
39
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? d : console[l] !== void 0 ? u(console, l) : console.log !== void 0 ? u(console, "log") : e;
|
|
37
40
|
}
|
|
38
41
|
function p() {
|
|
39
42
|
for (var l = this.getLevel(), m = 0; m < s.length; m++) {
|
|
40
|
-
var
|
|
41
|
-
this[
|
|
43
|
+
var c = s[m];
|
|
44
|
+
this[c] = m < l ? e : this.methodFactory(c, l, this.name);
|
|
42
45
|
}
|
|
43
46
|
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
44
47
|
return "No console available for logging";
|
|
@@ -48,14 +51,14 @@ function De() {
|
|
|
48
51
|
typeof console !== n && (p.call(this), this[l].apply(this, arguments));
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
|
-
function b(l, m,
|
|
54
|
+
function b(l, m, c) {
|
|
52
55
|
return y(l) || k.apply(this, arguments);
|
|
53
56
|
}
|
|
54
57
|
function h(l, m) {
|
|
55
|
-
var
|
|
58
|
+
var c = this, j, H, L, _ = "loglevel";
|
|
56
59
|
typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
|
|
57
|
-
function Ee(
|
|
58
|
-
var g = (s[
|
|
60
|
+
function Ee(f) {
|
|
61
|
+
var g = (s[f] || "silent").toUpperCase();
|
|
59
62
|
if (!(typeof window === n || !_)) {
|
|
60
63
|
try {
|
|
61
64
|
window.localStorage[_] = g;
|
|
@@ -68,22 +71,22 @@ function De() {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
function
|
|
72
|
-
var
|
|
74
|
+
function ee() {
|
|
75
|
+
var f;
|
|
73
76
|
if (!(typeof window === n || !_)) {
|
|
74
77
|
try {
|
|
75
|
-
|
|
78
|
+
f = window.localStorage[_];
|
|
76
79
|
} catch {
|
|
77
80
|
}
|
|
78
|
-
if (typeof
|
|
81
|
+
if (typeof f === n)
|
|
79
82
|
try {
|
|
80
|
-
var g = window.document.cookie,
|
|
81
|
-
|
|
82
|
-
g.slice(
|
|
83
|
+
var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
|
|
84
|
+
ne !== -1 && (f = /^([^;]+)/.exec(
|
|
85
|
+
g.slice(ne + O.length + 1)
|
|
83
86
|
)[1]);
|
|
84
87
|
} catch {
|
|
85
88
|
}
|
|
86
|
-
return
|
|
89
|
+
return c.levels[f] === void 0 && (f = void 0), f;
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
92
|
function Re() {
|
|
@@ -98,49 +101,49 @@ function De() {
|
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
|
-
function U(
|
|
102
|
-
var g =
|
|
103
|
-
if (typeof g == "string" &&
|
|
104
|
+
function U(f) {
|
|
105
|
+
var g = f;
|
|
106
|
+
if (typeof g == "string" && c.levels[g.toUpperCase()] !== void 0 && (g = c.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= c.levels.SILENT)
|
|
104
107
|
return g;
|
|
105
|
-
throw new TypeError("log.setLevel() called with invalid level: " +
|
|
108
|
+
throw new TypeError("log.setLevel() called with invalid level: " + f);
|
|
106
109
|
}
|
|
107
|
-
|
|
110
|
+
c.name = l, c.levels = {
|
|
108
111
|
TRACE: 0,
|
|
109
112
|
DEBUG: 1,
|
|
110
113
|
INFO: 2,
|
|
111
114
|
WARN: 3,
|
|
112
115
|
ERROR: 4,
|
|
113
116
|
SILENT: 5
|
|
114
|
-
},
|
|
115
|
-
return L ??
|
|
116
|
-
},
|
|
117
|
-
return L = U(
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
L = null, Re(), p.call(
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
if (i !==
|
|
128
|
-
for (var
|
|
129
|
-
r[
|
|
117
|
+
}, c.methodFactory = m || b, c.getLevel = function() {
|
|
118
|
+
return L ?? H ?? j;
|
|
119
|
+
}, c.setLevel = function(f, g) {
|
|
120
|
+
return L = U(f), g !== !1 && Ee(L), p.call(c);
|
|
121
|
+
}, c.setDefaultLevel = function(f) {
|
|
122
|
+
H = U(f), ee() || c.setLevel(f, !1);
|
|
123
|
+
}, c.resetLevel = function() {
|
|
124
|
+
L = null, Re(), p.call(c);
|
|
125
|
+
}, c.enableAll = function(f) {
|
|
126
|
+
c.setLevel(c.levels.TRACE, f);
|
|
127
|
+
}, c.disableAll = function(f) {
|
|
128
|
+
c.setLevel(c.levels.SILENT, f);
|
|
129
|
+
}, c.rebuild = function() {
|
|
130
|
+
if (i !== c && (j = U(i.getLevel())), p.call(c), i === c)
|
|
131
|
+
for (var f in r)
|
|
132
|
+
r[f].rebuild();
|
|
130
133
|
}, j = U(
|
|
131
134
|
i ? i.getLevel() : "WARN"
|
|
132
135
|
);
|
|
133
|
-
var
|
|
134
|
-
|
|
136
|
+
var te = ee();
|
|
137
|
+
te != null && (L = U(te)), p.call(c);
|
|
135
138
|
}
|
|
136
139
|
i = new h(), i.getLogger = function(m) {
|
|
137
140
|
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
138
141
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
139
|
-
var
|
|
140
|
-
return
|
|
142
|
+
var c = r[m];
|
|
143
|
+
return c || (c = r[m] = new h(
|
|
141
144
|
m,
|
|
142
145
|
i.methodFactory
|
|
143
|
-
)),
|
|
146
|
+
)), c;
|
|
144
147
|
};
|
|
145
148
|
var P = typeof window !== n ? window.log : void 0;
|
|
146
149
|
return i.noConflict = function() {
|
|
@@ -149,13 +152,13 @@ function De() {
|
|
|
149
152
|
return r;
|
|
150
153
|
}, i.default = i, i;
|
|
151
154
|
});
|
|
152
|
-
}(
|
|
155
|
+
}(J)), J.exports;
|
|
153
156
|
}
|
|
154
|
-
var
|
|
155
|
-
const ie = /* @__PURE__ */ Le(
|
|
156
|
-
let
|
|
157
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (
|
|
158
|
-
function
|
|
157
|
+
var ze = Je();
|
|
158
|
+
const ie = /* @__PURE__ */ Le(ze);
|
|
159
|
+
let B;
|
|
160
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
|
|
161
|
+
function V(t, e) {
|
|
159
162
|
if (t == null)
|
|
160
163
|
return !1;
|
|
161
164
|
try {
|
|
@@ -164,19 +167,19 @@ function q(t, e) {
|
|
|
164
167
|
return !1;
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
|
-
const
|
|
170
|
+
const N = Symbol(), Ne = Symbol(), G = Symbol(), We = Symbol(), Ke = Symbol(), He = Symbol(), $e = new TextEncoder(), Fe = new TextDecoder();
|
|
168
171
|
function E(t) {
|
|
169
|
-
return typeof t == "string" ?
|
|
172
|
+
return typeof t == "string" ? $e.encode(t) : Fe.decode(t);
|
|
170
173
|
}
|
|
171
174
|
const se = 32768;
|
|
172
|
-
function
|
|
175
|
+
function Me(t) {
|
|
173
176
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
174
177
|
const e = [];
|
|
175
178
|
for (let n = 0; n < t.byteLength; n += se)
|
|
176
179
|
e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
|
|
177
180
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
178
181
|
}
|
|
179
|
-
function
|
|
182
|
+
function Be(t) {
|
|
180
183
|
try {
|
|
181
184
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
182
185
|
for (let o = 0; o < e.length; o++)
|
|
@@ -187,9 +190,9 @@ function Fe(t) {
|
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
function A(t) {
|
|
190
|
-
return typeof t == "string" ?
|
|
193
|
+
return typeof t == "string" ? Be(t) : Me(t);
|
|
191
194
|
}
|
|
192
|
-
class
|
|
195
|
+
class qe {
|
|
193
196
|
constructor(e) {
|
|
194
197
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
195
198
|
}
|
|
@@ -218,22 +221,22 @@ class v extends Error {
|
|
|
218
221
|
super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
|
-
class
|
|
224
|
+
class Ve extends Error {
|
|
222
225
|
constructor(e, n) {
|
|
223
226
|
super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
|
-
const a =
|
|
229
|
+
const a = Ve, we = new qe(100);
|
|
227
230
|
function me(t) {
|
|
228
231
|
return t instanceof CryptoKey;
|
|
229
232
|
}
|
|
230
|
-
function
|
|
233
|
+
function Ge(t) {
|
|
231
234
|
return me(t) && t.type === "private";
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function Ye(t) {
|
|
234
237
|
return me(t) && t.type === "public";
|
|
235
238
|
}
|
|
236
|
-
function
|
|
239
|
+
function Y(t) {
|
|
237
240
|
try {
|
|
238
241
|
const e = t.headers.get("dpop-nonce");
|
|
239
242
|
e && we.set(new URL(t.url).origin, e);
|
|
@@ -244,21 +247,21 @@ function G(t) {
|
|
|
244
247
|
function x(t) {
|
|
245
248
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
246
249
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
250
|
+
function W(t) {
|
|
251
|
+
V(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
249
252
|
const e = new Headers(t);
|
|
250
|
-
if (
|
|
253
|
+
if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
|
|
251
254
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
252
255
|
if (e.has("dpop"))
|
|
253
256
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
254
257
|
return e;
|
|
255
258
|
}
|
|
256
|
-
function
|
|
259
|
+
function Ze(t) {
|
|
257
260
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
258
261
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
259
262
|
return t;
|
|
260
263
|
}
|
|
261
|
-
async function
|
|
264
|
+
async function Qe(t, e) {
|
|
262
265
|
if (!(t instanceof URL))
|
|
263
266
|
throw new TypeError('"issuerIdentifier" must be an instance of URL');
|
|
264
267
|
if (t.protocol !== "https:" && t.protocol !== "http:")
|
|
@@ -275,25 +278,25 @@ async function Ye(t, e) {
|
|
|
275
278
|
default:
|
|
276
279
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
277
280
|
}
|
|
278
|
-
const o =
|
|
279
|
-
return o.set("accept", "application/json"), (e?.[
|
|
281
|
+
const o = W(e?.headers);
|
|
282
|
+
return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
|
|
280
283
|
headers: Object.fromEntries(o.entries()),
|
|
281
284
|
method: "GET",
|
|
282
285
|
redirect: "manual",
|
|
283
286
|
signal: null
|
|
284
|
-
}).then(
|
|
287
|
+
}).then(Y);
|
|
285
288
|
}
|
|
286
289
|
function w(t) {
|
|
287
290
|
return typeof t == "string" && t.length !== 0;
|
|
288
291
|
}
|
|
289
|
-
async function
|
|
292
|
+
async function Xe(t, e) {
|
|
290
293
|
if (!(t instanceof URL))
|
|
291
294
|
throw new TypeError('"expectedIssuer" must be an instance of URL');
|
|
292
|
-
if (!
|
|
295
|
+
if (!V(e, Response))
|
|
293
296
|
throw new TypeError('"response" must be an instance of Response');
|
|
294
297
|
if (e.status !== 200)
|
|
295
298
|
throw new a('"response" is not a conform Authorization Server Metadata response');
|
|
296
|
-
|
|
299
|
+
X(e);
|
|
297
300
|
let n;
|
|
298
301
|
try {
|
|
299
302
|
n = await e.json();
|
|
@@ -308,16 +311,16 @@ async function Ze(t, e) {
|
|
|
308
311
|
throw new a('"response" body "issuer" does not match "expectedIssuer"');
|
|
309
312
|
return n;
|
|
310
313
|
}
|
|
311
|
-
function
|
|
314
|
+
function Z() {
|
|
312
315
|
return A(crypto.getRandomValues(new Uint8Array(32)));
|
|
313
316
|
}
|
|
314
|
-
function
|
|
315
|
-
return
|
|
317
|
+
function et() {
|
|
318
|
+
return Z();
|
|
316
319
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
320
|
+
function tt() {
|
|
321
|
+
return Z();
|
|
319
322
|
}
|
|
320
|
-
async function
|
|
323
|
+
async function nt(t) {
|
|
321
324
|
if (!w(t))
|
|
322
325
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
323
326
|
return A(await crypto.subtle.digest("SHA-256", E(t)));
|
|
@@ -325,11 +328,11 @@ async function et(t) {
|
|
|
325
328
|
function ae(t) {
|
|
326
329
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
327
330
|
}
|
|
328
|
-
function
|
|
331
|
+
function rt(t, e) {
|
|
329
332
|
const n = ae(t), o = ae(e);
|
|
330
333
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function ot(t) {
|
|
333
336
|
switch (t.algorithm.hash.name) {
|
|
334
337
|
case "SHA-256":
|
|
335
338
|
return "PS256";
|
|
@@ -341,7 +344,7 @@ function nt(t) {
|
|
|
341
344
|
throw new v("unsupported RsaHashedKeyAlgorithm hash name");
|
|
342
345
|
}
|
|
343
346
|
}
|
|
344
|
-
function
|
|
347
|
+
function it(t) {
|
|
345
348
|
switch (t.algorithm.hash.name) {
|
|
346
349
|
case "SHA-256":
|
|
347
350
|
return "RS256";
|
|
@@ -353,7 +356,7 @@ function rt(t) {
|
|
|
353
356
|
throw new v("unsupported RsaHashedKeyAlgorithm hash name");
|
|
354
357
|
}
|
|
355
358
|
}
|
|
356
|
-
function
|
|
359
|
+
function st(t) {
|
|
357
360
|
switch (t.algorithm.namedCurve) {
|
|
358
361
|
case "P-256":
|
|
359
362
|
return "ES256";
|
|
@@ -365,14 +368,14 @@ function ot(t) {
|
|
|
365
368
|
throw new v("unsupported EcKeyAlgorithm namedCurve");
|
|
366
369
|
}
|
|
367
370
|
}
|
|
368
|
-
function
|
|
371
|
+
function at(t) {
|
|
369
372
|
switch (t.algorithm.name) {
|
|
370
373
|
case "RSA-PSS":
|
|
371
|
-
return
|
|
374
|
+
return ot(t);
|
|
372
375
|
case "RSASSA-PKCS1-v1_5":
|
|
373
|
-
return
|
|
376
|
+
return it(t);
|
|
374
377
|
case "ECDSA":
|
|
375
|
-
return
|
|
378
|
+
return st(t);
|
|
376
379
|
case "Ed25519":
|
|
377
380
|
case "Ed448":
|
|
378
381
|
return "EdDSA";
|
|
@@ -380,15 +383,15 @@ function it(t) {
|
|
|
380
383
|
throw new v("unsupported CryptoKey algorithm name");
|
|
381
384
|
}
|
|
382
385
|
}
|
|
383
|
-
function
|
|
384
|
-
const e = t?.[
|
|
386
|
+
function K(t) {
|
|
387
|
+
const e = t?.[N];
|
|
385
388
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
386
389
|
}
|
|
387
390
|
function ge(t) {
|
|
388
|
-
const e = t?.[
|
|
391
|
+
const e = t?.[Ne];
|
|
389
392
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
390
393
|
}
|
|
391
|
-
function
|
|
394
|
+
function Q() {
|
|
392
395
|
return Math.floor(Date.now() / 1e3);
|
|
393
396
|
}
|
|
394
397
|
function C(t) {
|
|
@@ -414,11 +417,11 @@ function ue(t, e) {
|
|
|
414
417
|
if (e !== void 0)
|
|
415
418
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
416
419
|
}
|
|
417
|
-
async function
|
|
420
|
+
async function ct(t, e, n, o, s) {
|
|
418
421
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
419
422
|
case void 0:
|
|
420
423
|
case "client_secret_basic": {
|
|
421
|
-
o.set("authorization",
|
|
424
|
+
o.set("authorization", rt(e.client_id, ce(e.client_secret)));
|
|
422
425
|
break;
|
|
423
426
|
}
|
|
424
427
|
case "client_secret_post": {
|
|
@@ -437,43 +440,43 @@ async function st(t, e, n, o, s) {
|
|
|
437
440
|
throw new v("unsupported client token_endpoint_auth_method");
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
|
-
async function
|
|
443
|
+
async function ut(t, e, n) {
|
|
441
444
|
if (!n.usages.includes("sign"))
|
|
442
445
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
443
446
|
const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, s = A(await crypto.subtle.sign(Ae(n), n, E(o)));
|
|
444
447
|
return `${o}.${s}`;
|
|
445
448
|
}
|
|
446
|
-
async function
|
|
447
|
-
const { privateKey: i, publicKey:
|
|
448
|
-
if (!
|
|
449
|
+
async function lt(t, e, n, o, s, r) {
|
|
450
|
+
const { privateKey: i, publicKey: u, nonce: d = we.get(n.origin) } = e;
|
|
451
|
+
if (!Ge(i))
|
|
449
452
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
450
|
-
if (!
|
|
453
|
+
if (!Ye(u))
|
|
451
454
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
452
|
-
if (
|
|
455
|
+
if (d !== void 0 && !w(d))
|
|
453
456
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
454
|
-
if (!
|
|
457
|
+
if (!u.extractable)
|
|
455
458
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
456
|
-
const y =
|
|
457
|
-
alg:
|
|
459
|
+
const y = Q() + s, p = {
|
|
460
|
+
alg: at(i),
|
|
458
461
|
typ: "dpop+jwt",
|
|
459
|
-
jwk: await
|
|
462
|
+
jwk: await ft(u)
|
|
460
463
|
}, k = {
|
|
461
464
|
iat: y,
|
|
462
|
-
jti:
|
|
465
|
+
jti: Z(),
|
|
463
466
|
htm: o,
|
|
464
|
-
nonce:
|
|
467
|
+
nonce: d,
|
|
465
468
|
htu: `${n.origin}${n.pathname}`,
|
|
466
469
|
ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
467
470
|
};
|
|
468
|
-
e[
|
|
471
|
+
e[We]?.(p, k), t.set("dpop", await ut(p, k, i));
|
|
469
472
|
}
|
|
470
|
-
let
|
|
471
|
-
async function
|
|
472
|
-
const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t),
|
|
473
|
-
return
|
|
473
|
+
let z;
|
|
474
|
+
async function dt(t) {
|
|
475
|
+
const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), u = { kty: e, e: n, n: o, x: s, y: r, crv: i };
|
|
476
|
+
return z.set(t, u), u;
|
|
474
477
|
}
|
|
475
|
-
async function
|
|
476
|
-
return
|
|
478
|
+
async function ft(t) {
|
|
479
|
+
return z || (z = /* @__PURE__ */ new WeakMap()), z.get(t) || dt(t);
|
|
477
480
|
}
|
|
478
481
|
function le(t, e, n) {
|
|
479
482
|
if (typeof t != "string")
|
|
@@ -484,47 +487,47 @@ function ye(t, e, n = !1) {
|
|
|
484
487
|
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? le(t.mtls_endpoint_aliases[e], e, n) : le(t[e], e, n);
|
|
485
488
|
}
|
|
486
489
|
function be(t, e) {
|
|
487
|
-
return !!(t.use_mtls_endpoint_aliases || e?.[
|
|
490
|
+
return !!(t.use_mtls_endpoint_aliases || e?.[He]);
|
|
488
491
|
}
|
|
489
|
-
function
|
|
492
|
+
function q(t) {
|
|
490
493
|
const e = t;
|
|
491
494
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
492
495
|
}
|
|
493
|
-
async function
|
|
496
|
+
async function ht(t, e, n, o, s, r) {
|
|
494
497
|
if (!w(t))
|
|
495
498
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
496
499
|
if (!(n instanceof URL))
|
|
497
500
|
throw new TypeError('"url" must be an instance of URL');
|
|
498
|
-
return o =
|
|
501
|
+
return o = W(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await lt(o, r.DPoP, n, e.toUpperCase(), K({ [N]: r?.[N] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
|
|
499
502
|
body: s,
|
|
500
503
|
headers: Object.fromEntries(o.entries()),
|
|
501
504
|
method: e,
|
|
502
505
|
redirect: "manual",
|
|
503
|
-
signal: r?.signal ?
|
|
504
|
-
}).then(
|
|
506
|
+
signal: r?.signal ? Ze(r.signal) : null
|
|
507
|
+
}).then(Y);
|
|
505
508
|
}
|
|
506
|
-
async function
|
|
509
|
+
async function pt(t, e, n, o) {
|
|
507
510
|
C(t), I(e);
|
|
508
|
-
const s = ye(t, "userinfo_endpoint", be(e, o)), r =
|
|
509
|
-
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")),
|
|
511
|
+
const s = ye(t, "userinfo_endpoint", be(e, o)), r = W(o?.headers);
|
|
512
|
+
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ht(n, "GET", s, r, null, {
|
|
510
513
|
...o,
|
|
511
|
-
[
|
|
514
|
+
[N]: K(e)
|
|
512
515
|
});
|
|
513
516
|
}
|
|
514
|
-
async function
|
|
515
|
-
return await
|
|
517
|
+
async function wt(t, e, n, o, s, r, i) {
|
|
518
|
+
return await ct(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
|
|
516
519
|
body: s,
|
|
517
520
|
headers: Object.fromEntries(r.entries()),
|
|
518
521
|
method: n,
|
|
519
522
|
redirect: "manual",
|
|
520
523
|
signal: null
|
|
521
|
-
}).then(
|
|
524
|
+
}).then(Y);
|
|
522
525
|
}
|
|
523
526
|
async function _e(t, e, n, o, s) {
|
|
524
527
|
const r = ye(t, "token_endpoint", be(e, s));
|
|
525
528
|
o.set("grant_type", n);
|
|
526
|
-
const i =
|
|
527
|
-
return i.set("accept", "application/json"),
|
|
529
|
+
const i = W(s?.headers);
|
|
530
|
+
return i.set("accept", "application/json"), wt(t, e, "POST", r, o, i, s);
|
|
528
531
|
}
|
|
529
532
|
async function de(t, e, n, o) {
|
|
530
533
|
if (C(t), I(e), !w(n))
|
|
@@ -533,7 +536,7 @@ async function de(t, e, n, o) {
|
|
|
533
536
|
return s.set("refresh_token", n), _e(t, e, "refresh_token", s, o);
|
|
534
537
|
}
|
|
535
538
|
const ve = /* @__PURE__ */ new WeakMap();
|
|
536
|
-
function
|
|
539
|
+
function mt(t) {
|
|
537
540
|
if (!t.id_token)
|
|
538
541
|
return;
|
|
539
542
|
const e = ve.get(t);
|
|
@@ -542,15 +545,15 @@ function pt(t) {
|
|
|
542
545
|
return e[0];
|
|
543
546
|
}
|
|
544
547
|
async function Se(t, e, n, o = !1, s = !1) {
|
|
545
|
-
if (C(t), I(e), !
|
|
548
|
+
if (C(t), I(e), !V(n, Response))
|
|
546
549
|
throw new TypeError('"response" must be an instance of Response');
|
|
547
550
|
if (n.status !== 200) {
|
|
548
551
|
let i;
|
|
549
|
-
if (i = await
|
|
552
|
+
if (i = await kt(n))
|
|
550
553
|
return i;
|
|
551
554
|
throw new a('"response" is not a conform Token Endpoint response');
|
|
552
555
|
}
|
|
553
|
-
|
|
556
|
+
X(n);
|
|
554
557
|
let r;
|
|
555
558
|
try {
|
|
556
559
|
r = await n.json();
|
|
@@ -575,7 +578,7 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
575
578
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
576
579
|
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
577
580
|
if (r.id_token) {
|
|
578
|
-
const { claims: i, jwt:
|
|
581
|
+
const { claims: i, jwt: u } = await Pt(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, K(e), ge(e), e[Ke]).then(St.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(yt.bind(void 0, t.issuer)).then(gt.bind(void 0, e.client_id));
|
|
579
582
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
580
583
|
if (i.azp === void 0)
|
|
581
584
|
throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -584,15 +587,15 @@ async function Se(t, e, n, o = !1, s = !1) {
|
|
|
584
587
|
}
|
|
585
588
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
586
589
|
throw new a('ID Token "auth_time" (authentication time) must be a positive number');
|
|
587
|
-
ve.set(r, [i,
|
|
590
|
+
ve.set(r, [i, u]);
|
|
588
591
|
}
|
|
589
592
|
}
|
|
590
593
|
return r;
|
|
591
594
|
}
|
|
592
|
-
async function
|
|
595
|
+
async function fe(t, e, n) {
|
|
593
596
|
return Se(t, e, n);
|
|
594
597
|
}
|
|
595
|
-
function
|
|
598
|
+
function gt(t, e) {
|
|
596
599
|
if (Array.isArray(e.claims.aud)) {
|
|
597
600
|
if (!e.claims.aud.includes(t))
|
|
598
601
|
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
@@ -600,16 +603,16 @@ function wt(t, e) {
|
|
|
600
603
|
throw new a('unexpected JWT "aud" (audience) claim value');
|
|
601
604
|
return e;
|
|
602
605
|
}
|
|
603
|
-
function
|
|
606
|
+
function yt(t, e) {
|
|
604
607
|
if (e.claims.iss !== t)
|
|
605
608
|
throw new a('unexpected JWT "iss" (issuer) claim value');
|
|
606
609
|
return e;
|
|
607
610
|
}
|
|
608
611
|
const Te = /* @__PURE__ */ new WeakSet();
|
|
609
|
-
function
|
|
612
|
+
function bt(t) {
|
|
610
613
|
return Te.add(t), t;
|
|
611
614
|
}
|
|
612
|
-
async function
|
|
615
|
+
async function _t(t, e, n, o, s, r) {
|
|
613
616
|
if (C(t), I(e), !Te.has(n))
|
|
614
617
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
615
618
|
if (!w(o))
|
|
@@ -619,10 +622,10 @@ async function yt(t, e, n, o, s, r) {
|
|
|
619
622
|
const i = T(n, "code");
|
|
620
623
|
if (!i)
|
|
621
624
|
throw new a('no authorization code in "callbackParameters"');
|
|
622
|
-
const
|
|
623
|
-
return
|
|
625
|
+
const u = new URLSearchParams(r?.additionalParameters);
|
|
626
|
+
return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i), _e(t, e, "authorization_code", u, r);
|
|
624
627
|
}
|
|
625
|
-
const
|
|
628
|
+
const vt = {
|
|
626
629
|
aud: "audience",
|
|
627
630
|
c_hash: "code hash",
|
|
628
631
|
client_id: "client id",
|
|
@@ -638,33 +641,33 @@ const bt = {
|
|
|
638
641
|
htu: "http uri",
|
|
639
642
|
cnf: "confirmation"
|
|
640
643
|
};
|
|
641
|
-
function
|
|
644
|
+
function St(t, e) {
|
|
642
645
|
for (const n of t)
|
|
643
646
|
if (e.claims[n] === void 0)
|
|
644
|
-
throw new a(`JWT "${n}" (${
|
|
647
|
+
throw new a(`JWT "${n}" (${vt[n]}) claim missing`);
|
|
645
648
|
return e;
|
|
646
649
|
}
|
|
647
|
-
const
|
|
648
|
-
async function
|
|
650
|
+
const Tt = Symbol(), $ = Symbol();
|
|
651
|
+
async function At(t, e, n, o, s) {
|
|
649
652
|
const r = await Se(t, e, n);
|
|
650
|
-
if (
|
|
653
|
+
if (q(r))
|
|
651
654
|
return r;
|
|
652
655
|
if (!w(r.id_token))
|
|
653
656
|
throw new a('"response" body "id_token" property must be a non-empty string');
|
|
654
|
-
s ?? (s = e.default_max_age ??
|
|
655
|
-
const i =
|
|
656
|
-
if ((e.require_auth_time || s !==
|
|
657
|
+
s ?? (s = e.default_max_age ?? $);
|
|
658
|
+
const i = mt(r);
|
|
659
|
+
if ((e.require_auth_time || s !== $) && i.auth_time === void 0)
|
|
657
660
|
throw new a('ID Token "auth_time" (authentication time) claim missing');
|
|
658
|
-
if (s !==
|
|
661
|
+
if (s !== $) {
|
|
659
662
|
if (typeof s != "number" || s < 0)
|
|
660
663
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
661
|
-
const
|
|
662
|
-
if (i.auth_time + s <
|
|
664
|
+
const u = Q() + K(e), d = ge(e);
|
|
665
|
+
if (i.auth_time + s < u - d)
|
|
663
666
|
throw new a("too much time has elapsed since the last End-User authentication");
|
|
664
667
|
}
|
|
665
668
|
switch (o) {
|
|
666
669
|
case void 0:
|
|
667
|
-
case
|
|
670
|
+
case Tt:
|
|
668
671
|
if (i.nonce !== void 0)
|
|
669
672
|
throw new a('unexpected ID Token "nonce" claim value');
|
|
670
673
|
break;
|
|
@@ -678,13 +681,13 @@ async function St(t, e, n, o, s) {
|
|
|
678
681
|
}
|
|
679
682
|
return r;
|
|
680
683
|
}
|
|
681
|
-
function
|
|
684
|
+
function X(t) {
|
|
682
685
|
if (t.bodyUsed)
|
|
683
686
|
throw new TypeError('"response" body has been used already');
|
|
684
687
|
}
|
|
685
|
-
async function
|
|
688
|
+
async function kt(t) {
|
|
686
689
|
if (t.status > 399 && t.status < 500) {
|
|
687
|
-
|
|
690
|
+
X(t);
|
|
688
691
|
try {
|
|
689
692
|
const e = await t.json();
|
|
690
693
|
if (x(e) && typeof e.error == "string" && e.error.length)
|
|
@@ -693,11 +696,11 @@ async function Tt(t) {
|
|
|
693
696
|
}
|
|
694
697
|
}
|
|
695
698
|
}
|
|
696
|
-
function
|
|
699
|
+
function he(t) {
|
|
697
700
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
698
701
|
throw new a(`${t.name} modulusLength must be at least 2048 bits`);
|
|
699
702
|
}
|
|
700
|
-
function
|
|
703
|
+
function Et(t) {
|
|
701
704
|
switch (t) {
|
|
702
705
|
case "P-256":
|
|
703
706
|
return "SHA-256";
|
|
@@ -714,10 +717,10 @@ function Ae(t) {
|
|
|
714
717
|
case "ECDSA":
|
|
715
718
|
return {
|
|
716
719
|
name: t.algorithm.name,
|
|
717
|
-
hash:
|
|
720
|
+
hash: Et(t.algorithm.namedCurve)
|
|
718
721
|
};
|
|
719
722
|
case "RSA-PSS":
|
|
720
|
-
switch (
|
|
723
|
+
switch (he(t.algorithm), t.algorithm.hash.name) {
|
|
721
724
|
case "SHA-256":
|
|
722
725
|
case "SHA-384":
|
|
723
726
|
case "SHA-512":
|
|
@@ -729,7 +732,7 @@ function Ae(t) {
|
|
|
729
732
|
throw new v();
|
|
730
733
|
}
|
|
731
734
|
case "RSASSA-PKCS1-v1_5":
|
|
732
|
-
return
|
|
735
|
+
return he(t.algorithm), t.algorithm.name;
|
|
733
736
|
case "Ed448":
|
|
734
737
|
case "Ed25519":
|
|
735
738
|
return t.algorithm.name;
|
|
@@ -737,16 +740,16 @@ function Ae(t) {
|
|
|
737
740
|
throw new v();
|
|
738
741
|
}
|
|
739
742
|
const ke = Symbol();
|
|
740
|
-
async function
|
|
743
|
+
async function Rt(t, e, n, o) {
|
|
741
744
|
const s = `${t}.${e}`;
|
|
742
745
|
if (!await crypto.subtle.verify(Ae(n), n, o, E(s)))
|
|
743
746
|
throw new a("JWT signature verification failed");
|
|
744
747
|
}
|
|
745
|
-
async function
|
|
746
|
-
let { 0: i, 1:
|
|
748
|
+
async function Pt(t, e, n, o, s, r) {
|
|
749
|
+
let { 0: i, 1: u, 2: d, length: y } = t.split(".");
|
|
747
750
|
if (y === 5)
|
|
748
751
|
if (r !== void 0)
|
|
749
|
-
t = await r(t), { 0: i, 1:
|
|
752
|
+
t = await r(t), { 0: i, 1: u, 2: d, length: y } = t.split(".");
|
|
750
753
|
else
|
|
751
754
|
throw new v("JWE structure JWTs are not supported");
|
|
752
755
|
if (y !== 3)
|
|
@@ -761,18 +764,18 @@ async function Et(t, e, n, o, s, r) {
|
|
|
761
764
|
throw new a("JWT Header must be a top level object");
|
|
762
765
|
if (e(p), p.crit !== void 0)
|
|
763
766
|
throw new a('unexpected JWT "crit" header parameter');
|
|
764
|
-
const k = A(
|
|
767
|
+
const k = A(d);
|
|
765
768
|
let b;
|
|
766
|
-
n !== ke && (b = await n(p), await
|
|
769
|
+
n !== ke && (b = await n(p), await Rt(i, u, b, k));
|
|
767
770
|
let h;
|
|
768
771
|
try {
|
|
769
|
-
h = JSON.parse(E(A(
|
|
772
|
+
h = JSON.parse(E(A(u)));
|
|
770
773
|
} catch (l) {
|
|
771
774
|
throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
772
775
|
}
|
|
773
776
|
if (!x(h))
|
|
774
777
|
throw new a("JWT Payload must be a top level object");
|
|
775
|
-
const P =
|
|
778
|
+
const P = Q() + o;
|
|
776
779
|
if (h.exp !== void 0) {
|
|
777
780
|
if (typeof h.exp != "number")
|
|
778
781
|
throw new a('unexpected JWT "exp" (expiration time) claim type');
|
|
@@ -793,7 +796,7 @@ async function Et(t, e, n, o, s, r) {
|
|
|
793
796
|
throw new a('unexpected JWT "aud" (audience) claim type');
|
|
794
797
|
return { header: p, claims: h, signature: k, key: b, jwt: t };
|
|
795
798
|
}
|
|
796
|
-
function
|
|
799
|
+
function Lt(t, e, n) {
|
|
797
800
|
if (t !== void 0) {
|
|
798
801
|
if (n.alg !== t)
|
|
799
802
|
throw new a('unexpected JWT "alg" header parameter');
|
|
@@ -813,8 +816,8 @@ function T(t, e) {
|
|
|
813
816
|
throw new a(`"${e}" parameter must be provided only once`);
|
|
814
817
|
return n;
|
|
815
818
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
819
|
+
const Ut = Symbol(), xt = Symbol();
|
|
820
|
+
function Ct(t, e, n, o) {
|
|
818
821
|
if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
819
822
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
820
823
|
if (T(n, "response"))
|
|
@@ -826,11 +829,11 @@ function Ut(t, e, n, o) {
|
|
|
826
829
|
throw new a('unexpected "iss" (issuer) response parameter value');
|
|
827
830
|
switch (o) {
|
|
828
831
|
case void 0:
|
|
829
|
-
case
|
|
832
|
+
case xt:
|
|
830
833
|
if (r !== void 0)
|
|
831
834
|
throw new a('unexpected "state" response parameter encountered');
|
|
832
835
|
break;
|
|
833
|
-
case
|
|
836
|
+
case Ut:
|
|
834
837
|
break;
|
|
835
838
|
default:
|
|
836
839
|
if (!w(o))
|
|
@@ -847,13 +850,13 @@ function Ut(t, e, n, o) {
|
|
|
847
850
|
error_description: T(n, "error_description"),
|
|
848
851
|
error_uri: T(n, "error_uri")
|
|
849
852
|
};
|
|
850
|
-
const
|
|
851
|
-
if (
|
|
853
|
+
const u = T(n, "id_token"), d = T(n, "token");
|
|
854
|
+
if (u !== void 0 || d !== void 0)
|
|
852
855
|
throw new v("implicit and hybrid flows are not supported");
|
|
853
|
-
return
|
|
856
|
+
return bt(new URLSearchParams(n));
|
|
854
857
|
}
|
|
855
|
-
const
|
|
856
|
-
class
|
|
858
|
+
const F = "code-verifier", M = "oauth-state", pe = "/oauth/callback";
|
|
859
|
+
class It extends Ie {
|
|
857
860
|
client;
|
|
858
861
|
issuer;
|
|
859
862
|
authorizationServer;
|
|
@@ -871,18 +874,18 @@ class xt extends Ce {
|
|
|
871
874
|
redirectToAfterSignUp: s,
|
|
872
875
|
redirectToAfterSignIn: r,
|
|
873
876
|
redirectToAfterSignOut: i = "/",
|
|
874
|
-
basePath:
|
|
875
|
-
scopes:
|
|
877
|
+
basePath: u,
|
|
878
|
+
scopes: d
|
|
876
879
|
}) {
|
|
877
880
|
super(), this.client = {
|
|
878
881
|
client_id: o,
|
|
879
882
|
token_endpoint_auth_method: "none"
|
|
880
|
-
}, this.audience = n, this.issuer = e, this.callbackUrlPath =
|
|
883
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = Ce(u, pe), this.scopes = d ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
|
|
881
884
|
}
|
|
882
885
|
async getAuthServer() {
|
|
883
886
|
if (!this.authorizationServer) {
|
|
884
|
-
const e = new URL(this.issuer), n = await
|
|
885
|
-
this.authorizationServer = await
|
|
887
|
+
const e = new URL(this.issuer), n = await Qe(e);
|
|
888
|
+
this.authorizationServer = await Xe(
|
|
886
889
|
e,
|
|
887
890
|
n
|
|
888
891
|
);
|
|
@@ -894,7 +897,7 @@ class xt extends Ce {
|
|
|
894
897
|
* @param response
|
|
895
898
|
*/
|
|
896
899
|
setTokensFromResponse(e) {
|
|
897
|
-
if (
|
|
900
|
+
if (q(e))
|
|
898
901
|
throw ie.error("Bad Token Response", e), new re("Bad Token Response", e);
|
|
899
902
|
if (!e.expires_in)
|
|
900
903
|
throw new R("No expires_in in response");
|
|
@@ -909,40 +912,49 @@ class xt extends Ce {
|
|
|
909
912
|
providerData: n
|
|
910
913
|
});
|
|
911
914
|
}
|
|
912
|
-
async signUp({
|
|
915
|
+
async signUp({
|
|
916
|
+
redirectTo: e,
|
|
917
|
+
replace: n = !1
|
|
918
|
+
} = {}) {
|
|
913
919
|
return this.authorize({
|
|
914
920
|
redirectTo: this.redirectToAfterSignUp ?? e ?? "/",
|
|
921
|
+
replace: n,
|
|
915
922
|
isSignUp: !0
|
|
916
923
|
});
|
|
917
924
|
}
|
|
918
|
-
async signIn({
|
|
925
|
+
async signIn({
|
|
926
|
+
redirectTo: e,
|
|
927
|
+
replace: n = !1
|
|
928
|
+
} = {}) {
|
|
919
929
|
return this.authorize({
|
|
920
|
-
redirectTo: this.redirectToAfterSignIn ?? e ?? "/"
|
|
930
|
+
redirectTo: this.redirectToAfterSignIn ?? e ?? "/",
|
|
931
|
+
replace: n
|
|
921
932
|
});
|
|
922
933
|
}
|
|
923
934
|
async authorize({
|
|
924
935
|
redirectTo: e,
|
|
925
|
-
isSignUp: n = !1
|
|
936
|
+
isSignUp: n = !1,
|
|
937
|
+
replace: o = !1
|
|
926
938
|
}) {
|
|
927
|
-
const
|
|
928
|
-
if (!
|
|
939
|
+
const s = "S256", r = await this.getAuthServer();
|
|
940
|
+
if (!r.authorization_endpoint)
|
|
929
941
|
throw new R("No authorization endpoint");
|
|
930
|
-
const
|
|
931
|
-
sessionStorage.setItem(
|
|
932
|
-
const
|
|
933
|
-
|
|
942
|
+
const i = et(), u = await nt(i);
|
|
943
|
+
sessionStorage.setItem(F, i);
|
|
944
|
+
const d = new URL(
|
|
945
|
+
r.authorization_endpoint
|
|
934
946
|
);
|
|
935
947
|
sessionStorage.setItem("redirect-to", e);
|
|
936
|
-
const
|
|
937
|
-
|
|
948
|
+
const y = new URL(window.location.origin);
|
|
949
|
+
y.pathname = this.callbackUrlPath, y.search = "", d.searchParams.set("client_id", this.client.client_id), d.searchParams.set("redirect_uri", y.toString()), d.searchParams.set("response_type", "code"), d.searchParams.set("scope", this.scopes.join(" ")), d.searchParams.set("code_challenge", u), d.searchParams.set(
|
|
938
950
|
"code_challenge_method",
|
|
939
|
-
|
|
940
|
-
), this.audience &&
|
|
951
|
+
s
|
|
952
|
+
), this.audience && d.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(d, {
|
|
941
953
|
isSignIn: !n,
|
|
942
954
|
isSignUp: n
|
|
943
955
|
});
|
|
944
|
-
const
|
|
945
|
-
sessionStorage.setItem(
|
|
956
|
+
const p = tt();
|
|
957
|
+
sessionStorage.setItem(M, p), d.searchParams.set("state", p), o ? location.replace(d.href) : location.href = d.href;
|
|
946
958
|
}
|
|
947
959
|
async getAccessToken() {
|
|
948
960
|
const e = await this.getAuthServer(), { providerData: n } = S.getState();
|
|
@@ -961,7 +973,7 @@ class xt extends Ce {
|
|
|
961
973
|
e,
|
|
962
974
|
this.client,
|
|
963
975
|
o.refreshToken
|
|
964
|
-
), r = await
|
|
976
|
+
), r = await fe(
|
|
965
977
|
e,
|
|
966
978
|
this.client,
|
|
967
979
|
s
|
|
@@ -1015,7 +1027,7 @@ class xt extends Ce {
|
|
|
1015
1027
|
o,
|
|
1016
1028
|
this.client,
|
|
1017
1029
|
n.refreshToken
|
|
1018
|
-
), r = await
|
|
1030
|
+
), r = await fe(
|
|
1019
1031
|
o,
|
|
1020
1032
|
this.client,
|
|
1021
1033
|
s
|
|
@@ -1036,38 +1048,38 @@ class xt extends Ce {
|
|
|
1036
1048
|
S.setState({ isPending: !1 });
|
|
1037
1049
|
};
|
|
1038
1050
|
handleCallback = async () => {
|
|
1039
|
-
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(
|
|
1040
|
-
if (sessionStorage.removeItem(
|
|
1051
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
|
|
1052
|
+
if (sessionStorage.removeItem(M), n !== o)
|
|
1041
1053
|
throw new R("Invalid state parameter");
|
|
1042
|
-
const s = sessionStorage.getItem(
|
|
1043
|
-
if (sessionStorage.removeItem(
|
|
1054
|
+
const s = sessionStorage.getItem(F);
|
|
1055
|
+
if (sessionStorage.removeItem(F), !s)
|
|
1044
1056
|
throw new R("No code verifier found in state.");
|
|
1045
|
-
const r = await this.getAuthServer(), i =
|
|
1057
|
+
const r = await this.getAuthServer(), i = Ct(
|
|
1046
1058
|
r,
|
|
1047
1059
|
this.client,
|
|
1048
1060
|
e.searchParams,
|
|
1049
1061
|
n ?? void 0
|
|
1050
1062
|
);
|
|
1051
|
-
if (
|
|
1063
|
+
if (q(i))
|
|
1052
1064
|
throw ie.error("Error validating OAuth response", i), new re(
|
|
1053
1065
|
"Error validating OAuth response",
|
|
1054
1066
|
i
|
|
1055
1067
|
);
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1068
|
+
const u = new URL(e);
|
|
1069
|
+
u.pathname = this.callbackUrlPath, u.search = "";
|
|
1070
|
+
const d = await _t(
|
|
1059
1071
|
r,
|
|
1060
1072
|
this.client,
|
|
1061
1073
|
i,
|
|
1062
|
-
|
|
1074
|
+
u.toString(),
|
|
1063
1075
|
s
|
|
1064
|
-
), y = await
|
|
1076
|
+
), y = await At(
|
|
1065
1077
|
r,
|
|
1066
1078
|
this.client,
|
|
1067
|
-
|
|
1079
|
+
d
|
|
1068
1080
|
);
|
|
1069
1081
|
this.setTokensFromResponse(y);
|
|
1070
|
-
const p = await this.getAccessToken(), b = await (await
|
|
1082
|
+
const p = await this.getAccessToken(), b = await (await pt(
|
|
1071
1083
|
r,
|
|
1072
1084
|
this.client,
|
|
1073
1085
|
p
|
|
@@ -1091,15 +1103,21 @@ class xt extends Ce {
|
|
|
1091
1103
|
...super.getRoutes(),
|
|
1092
1104
|
{
|
|
1093
1105
|
path: pe,
|
|
1094
|
-
element: /* @__PURE__ */
|
|
1106
|
+
element: /* @__PURE__ */ D.jsx(xe, { children: /* @__PURE__ */ D.jsx(
|
|
1107
|
+
Ue,
|
|
1108
|
+
{
|
|
1109
|
+
fallbackRender: ({ error: e }) => /* @__PURE__ */ D.jsx(Oe, { error: e }),
|
|
1110
|
+
children: /* @__PURE__ */ D.jsx(je, { handleCallback: this.handleCallback })
|
|
1111
|
+
}
|
|
1112
|
+
) })
|
|
1095
1113
|
}
|
|
1096
1114
|
];
|
|
1097
1115
|
}
|
|
1098
1116
|
}
|
|
1099
|
-
const
|
|
1117
|
+
const Ht = (t) => new It(t);
|
|
1100
1118
|
export {
|
|
1101
1119
|
pe as OPENID_CALLBACK_PATH,
|
|
1102
|
-
|
|
1103
|
-
|
|
1120
|
+
It as OpenIDAuthenticationProvider,
|
|
1121
|
+
Ht as default
|
|
1104
1122
|
};
|
|
1105
1123
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|