@go-mondo/identity-sdk 0.0.1 → 0.0.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yaml +105 -0
- package/.release-please-manifest.json +3 -1
- package/.tsbuildinfo/cjs.json +1 -0
- package/.tsbuildinfo/esm.json +1 -0
- package/.vscode/settings.json +41 -0
- package/CHANGELOG.md +38 -0
- package/biome.json +1 -1
- package/dist/cjs/action/index.d.ts +2 -0
- package/dist/cjs/action/index.d.ts.map +1 -0
- package/dist/cjs/action/index.js +17 -0
- package/dist/cjs/action/schema/base.d.ts +21 -0
- package/dist/cjs/action/schema/base.d.ts.map +1 -0
- package/dist/cjs/action/schema/base.js +19 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts +31 -0
- package/dist/cjs/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/set-password.js +18 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up-verification.js +15 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/cjs/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/sign-up.js +21 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/cjs/action/schema/operations/user-attribute-verification.js +13 -0
- package/dist/cjs/action/schema/schema.d.ts +92 -0
- package/dist/cjs/action/schema/schema.d.ts.map +1 -0
- package/dist/cjs/action/schema/schema.js +40 -0
- package/dist/cjs/activity/index.d.ts +2 -0
- package/dist/cjs/activity/index.d.ts.map +1 -0
- package/dist/cjs/activity/index.js +17 -0
- package/dist/cjs/activity/schema/base.d.ts +54 -0
- package/dist/cjs/activity/schema/base.d.ts.map +1 -0
- package/dist/cjs/activity/schema/base.js +34 -0
- package/dist/cjs/activity/schema/schema.d.ts +156 -0
- package/dist/cjs/activity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/activity/schema/schema.js +54 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authentication.js +16 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts +29 -0
- package/dist/cjs/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/authorization.js +17 -0
- package/dist/cjs/activity/schema/types/note.d.ts +51 -0
- package/dist/cjs/activity/schema/types/note.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/note.js +17 -0
- package/dist/cjs/activity/schema/types/operation.d.ts +31 -0
- package/dist/cjs/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/operation.js +18 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts +22 -0
- package/dist/cjs/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/cjs/activity/schema/types/unknown.js +9 -0
- package/dist/cjs/activity/schema/utils.d.ts +7 -0
- package/dist/cjs/activity/schema/utils.d.ts.map +1 -0
- package/dist/cjs/activity/schema/utils.js +16 -0
- package/dist/cjs/app/index.d.ts +2 -0
- package/dist/cjs/app/index.d.ts.map +1 -0
- package/dist/cjs/app/index.js +17 -0
- package/dist/cjs/app/schema/app.d.ts +58 -0
- package/dist/cjs/app/schema/app.d.ts.map +1 -0
- package/dist/cjs/app/schema/app.js +43 -0
- package/dist/cjs/app/schema/authorization.d.ts +37 -0
- package/dist/cjs/app/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/app/schema/authorization.js +44 -0
- package/dist/cjs/app/schema/oauth.d.ts +30 -0
- package/dist/cjs/app/schema/oauth.d.ts.map +1 -0
- package/dist/cjs/app/schema/oauth.js +21 -0
- package/dist/cjs/app/schema/oidc.d.ts +28 -0
- package/dist/cjs/app/schema/oidc.d.ts.map +1 -0
- package/dist/cjs/app/schema/oidc.js +13 -0
- package/dist/cjs/app/schema/registration.d.ts +22 -0
- package/dist/cjs/app/schema/registration.d.ts.map +1 -0
- package/dist/cjs/app/schema/registration.js +16 -0
- package/dist/cjs/app/schema/saml.d.ts +28 -0
- package/dist/cjs/app/schema/saml.d.ts.map +1 -0
- package/dist/cjs/app/schema/saml.js +13 -0
- package/dist/cjs/app/schema/schema.d.ts +8 -0
- package/dist/cjs/app/schema/schema.d.ts.map +1 -0
- package/dist/cjs/app/schema/schema.js +23 -0
- package/dist/cjs/app/schema/utils.d.ts +11 -0
- package/dist/cjs/app/schema/utils.d.ts.map +1 -0
- package/dist/cjs/app/schema/utils.js +23 -0
- package/dist/cjs/association/index.d.ts +2 -0
- package/dist/cjs/association/index.d.ts.map +1 -0
- package/dist/cjs/association/index.js +17 -0
- package/dist/cjs/association/schema/association.d.ts +82 -0
- package/dist/cjs/association/schema/association.d.ts.map +1 -0
- package/dist/cjs/association/schema/association.js +26 -0
- package/dist/cjs/association/schema/schema.d.ts +2 -0
- package/dist/cjs/association/schema/schema.d.ts.map +1 -0
- package/dist/cjs/association/schema/schema.js +17 -0
- package/dist/cjs/authentication/index.d.ts +2 -0
- package/dist/cjs/authentication/index.d.ts.map +1 -0
- package/dist/cjs/authentication/index.js +17 -0
- package/dist/cjs/authentication/schema/factors.d.ts +48 -0
- package/dist/cjs/authentication/schema/factors.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.js +28 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts +2 -0
- package/dist/cjs/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/factors.test.js +123 -0
- package/dist/cjs/authentication/schema/provider.d.ts +27 -0
- package/dist/cjs/authentication/schema/provider.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/provider.js +24 -0
- package/dist/cjs/authentication/schema/schema.d.ts +6 -0
- package/dist/cjs/authentication/schema/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/schema.js +21 -0
- package/dist/cjs/authentication/schema/session.d.ts +59 -0
- package/dist/cjs/authentication/schema/session.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/session.js +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts +46 -0
- package/dist/cjs/authentication/schema/settings.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/settings.js +16 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/cjs/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/base.js +39 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/cjs/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/schema.js +39 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/cjs/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/email.js +20 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/cjs/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/password.js +35 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/cjs/authentication/schema/strategy/types/totp.js +48 -0
- package/dist/cjs/authorization/index.d.ts +6 -0
- package/dist/cjs/authorization/index.d.ts.map +1 -0
- package/dist/cjs/authorization/index.js +21 -0
- package/dist/cjs/authorization/permissions/resources.d.ts +20 -0
- package/dist/cjs/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/resources.js +57 -0
- package/dist/cjs/authorization/permissions/schema.d.ts +104 -0
- package/dist/cjs/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/permissions/schema.js +66 -0
- package/dist/cjs/authorization/roles/resources.d.ts +20 -0
- package/dist/cjs/authorization/roles/resources.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/resources.js +57 -0
- package/dist/cjs/authorization/roles/schema.d.ts +113 -0
- package/dist/cjs/authorization/roles/schema.d.ts.map +1 -0
- package/dist/cjs/authorization/roles/schema.js +72 -0
- package/dist/cjs/authorization/utils.d.ts +11 -0
- package/dist/cjs/authorization/utils.d.ts.map +1 -0
- package/dist/cjs/authorization/utils.js +23 -0
- package/dist/cjs/common/errors/http.d.ts +17 -0
- package/dist/cjs/common/errors/http.d.ts.map +1 -0
- package/dist/cjs/common/errors/http.js +18 -0
- package/dist/cjs/common/errors/validation.d.ts +11 -0
- package/dist/cjs/common/errors/validation.d.ts.map +1 -0
- package/dist/cjs/common/errors/validation.js +12 -0
- package/dist/cjs/common/index.d.ts +6 -0
- package/dist/cjs/common/index.d.ts.map +1 -0
- package/dist/cjs/common/index.js +21 -0
- package/dist/cjs/common/resources/authorization.d.ts +2 -0
- package/dist/cjs/common/resources/authorization.d.ts.map +1 -0
- package/dist/cjs/common/resources/authorization.js +2 -0
- package/dist/cjs/common/resources/init.d.ts +16 -0
- package/dist/cjs/common/resources/init.d.ts.map +1 -0
- package/dist/cjs/common/resources/init.js +38 -0
- package/dist/cjs/common/resources/operations.d.ts +7 -0
- package/dist/cjs/common/resources/operations.d.ts.map +1 -0
- package/dist/cjs/common/resources/operations.js +90 -0
- package/dist/cjs/common/resources/utils.d.ts +18 -0
- package/dist/cjs/common/resources/utils.d.ts.map +1 -0
- package/dist/cjs/common/resources/utils.js +96 -0
- package/dist/cjs/common/schema/aggregate.d.ts +6 -0
- package/dist/cjs/common/schema/aggregate.d.ts.map +1 -0
- package/dist/cjs/common/schema/aggregate.js +8 -0
- package/dist/cjs/common/schema/collection.d.ts +18 -0
- package/dist/cjs/common/schema/collection.d.ts.map +1 -0
- package/dist/cjs/common/schema/collection.js +10 -0
- package/dist/cjs/common/schema/dates.d.ts +39 -0
- package/dist/cjs/common/schema/dates.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.js +34 -0
- package/dist/cjs/common/schema/dates.test.d.ts +2 -0
- package/dist/cjs/common/schema/dates.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/dates.test.js +33 -0
- package/dist/cjs/common/schema/jwt.d.ts +21 -0
- package/dist/cjs/common/schema/jwt.d.ts.map +1 -0
- package/dist/cjs/common/schema/jwt.js +24 -0
- package/dist/cjs/common/schema/metadata.d.ts +47 -0
- package/dist/cjs/common/schema/metadata.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.js +88 -0
- package/dist/cjs/common/schema/metadata.test.d.ts +2 -0
- package/dist/cjs/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/cjs/common/schema/metadata.test.js +62 -0
- package/dist/cjs/common/schema/pagination.d.ts +6 -0
- package/dist/cjs/common/schema/pagination.d.ts.map +1 -0
- package/dist/cjs/common/schema/pagination.js +8 -0
- package/dist/cjs/common/schema/schema.d.ts +8 -0
- package/dist/cjs/common/schema/schema.d.ts.map +1 -0
- package/dist/cjs/common/schema/schema.js +23 -0
- package/dist/cjs/common/schema/sets.d.ts +3 -0
- package/dist/cjs/common/schema/sets.d.ts.map +1 -0
- package/dist/cjs/common/schema/sets.js +9 -0
- package/dist/cjs/customer/index.d.ts +4 -0
- package/dist/cjs/customer/index.d.ts.map +1 -0
- package/dist/cjs/customer/index.js +19 -0
- package/dist/cjs/customer/schema/organization.d.ts +54 -0
- package/dist/cjs/customer/schema/organization.d.ts.map +1 -0
- package/dist/cjs/customer/schema/organization.js +40 -0
- package/dist/cjs/customer/schema/schema.d.ts +4 -0
- package/dist/cjs/customer/schema/schema.d.ts.map +1 -0
- package/dist/cjs/customer/schema/schema.js +19 -0
- package/dist/cjs/customer/schema/utils.d.ts +11 -0
- package/dist/cjs/customer/schema/utils.d.ts.map +1 -0
- package/dist/cjs/customer/schema/utils.js +23 -0
- package/dist/cjs/customer/users/resources.d.ts +20 -0
- package/dist/cjs/customer/users/resources.d.ts.map +1 -0
- package/dist/cjs/customer/users/resources.js +57 -0
- package/dist/cjs/customer/users/schema.d.ts +151 -0
- package/dist/cjs/customer/users/schema.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.js +91 -0
- package/dist/cjs/customer/users/schema.test.d.ts +2 -0
- package/dist/cjs/customer/users/schema.test.d.ts.map +1 -0
- package/dist/cjs/customer/users/schema.test.js +57 -0
- package/dist/cjs/identity/index.d.ts +2 -0
- package/dist/cjs/identity/index.d.ts.map +1 -0
- package/dist/cjs/identity/index.js +17 -0
- package/dist/cjs/identity/schema/schema.d.ts +7 -0
- package/dist/cjs/identity/schema/schema.d.ts.map +1 -0
- package/dist/cjs/identity/schema/schema.js +9 -0
- package/dist/cjs/oauth/authorize/index.d.ts +2 -0
- package/dist/cjs/oauth/authorize/index.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/index.js +17 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/authorization-code.js +34 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/grants/implicit.js +21 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/cjs/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/authorize/schema/schema.js +25 -0
- package/dist/cjs/oauth/common/schema.d.ts +62 -0
- package/dist/cjs/oauth/common/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/common/schema.js +54 -0
- package/dist/cjs/oauth/index.d.ts +4 -0
- package/dist/cjs/oauth/index.d.ts.map +1 -0
- package/dist/cjs/oauth/index.js +49 -0
- package/dist/cjs/oauth/token/index.d.ts +2 -0
- package/dist/cjs/oauth/token/index.d.ts.map +1 -0
- package/dist/cjs/oauth/token/index.js +17 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/authorization-code.js +20 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/client-credentials.js +25 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/grants/refresh-token.js +17 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts +28 -0
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/cjs/oauth/token/schema/schema.js +27 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/workspace/index.d.ts +2 -0
- package/dist/cjs/workspace/index.d.ts.map +1 -0
- package/dist/cjs/workspace/index.js +17 -0
- package/dist/cjs/workspace/schema/authorization.d.ts +31 -0
- package/dist/cjs/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/authorization.js +22 -0
- package/dist/cjs/workspace/schema/branding.d.ts +38 -0
- package/dist/cjs/workspace/schema/branding.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/branding.js +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts +25 -0
- package/dist/cjs/workspace/schema/membership.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/membership.js +19 -0
- package/dist/cjs/workspace/schema/registration.d.ts +28 -0
- package/dist/cjs/workspace/schema/registration.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/registration.js +22 -0
- package/dist/cjs/workspace/schema/schema.d.ts +10 -0
- package/dist/cjs/workspace/schema/schema.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/schema.js +25 -0
- package/dist/cjs/workspace/schema/settings.d.ts +23 -0
- package/dist/cjs/workspace/schema/settings.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/settings.js +15 -0
- package/dist/cjs/workspace/schema/tenant.d.ts +57 -0
- package/dist/cjs/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/tenant.js +26 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts +62 -0
- package/dist/cjs/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-notification.js +44 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/cjs/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/user-preferences.js +19 -0
- package/dist/cjs/workspace/schema/utils.d.ts +15 -0
- package/dist/cjs/workspace/schema/utils.d.ts.map +1 -0
- package/dist/cjs/workspace/schema/utils.js +64 -0
- package/dist/esm/action/index.d.ts +2 -0
- package/dist/esm/action/index.d.ts.map +1 -0
- package/dist/esm/action/index.js +1 -0
- package/dist/esm/action/schema/base.d.ts +21 -0
- package/dist/esm/action/schema/base.d.ts.map +1 -0
- package/dist/esm/action/schema/base.js +16 -0
- package/dist/esm/action/schema/operations/set-password.d.ts +31 -0
- package/dist/esm/action/schema/operations/set-password.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/set-password.js +15 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts +22 -0
- package/dist/esm/action/schema/operations/sign-up-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up-verification.js +12 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts +44 -0
- package/dist/esm/action/schema/operations/sign-up.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/sign-up.js +18 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts +20 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.d.ts.map +1 -0
- package/dist/esm/action/schema/operations/user-attribute-verification.js +10 -0
- package/dist/esm/action/schema/schema.d.ts +92 -0
- package/dist/esm/action/schema/schema.d.ts.map +1 -0
- package/dist/esm/action/schema/schema.js +21 -0
- package/dist/esm/activity/index.d.ts +2 -0
- package/dist/esm/activity/index.d.ts.map +1 -0
- package/dist/esm/activity/index.js +1 -0
- package/dist/esm/activity/schema/base.d.ts +54 -0
- package/dist/esm/activity/schema/base.d.ts.map +1 -0
- package/dist/esm/activity/schema/base.js +31 -0
- package/dist/esm/activity/schema/schema.d.ts +156 -0
- package/dist/esm/activity/schema/schema.d.ts.map +1 -0
- package/dist/esm/activity/schema/schema.js +33 -0
- package/dist/esm/activity/schema/types/authentication.d.ts +29 -0
- package/dist/esm/activity/schema/types/authentication.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authentication.js +13 -0
- package/dist/esm/activity/schema/types/authorization.d.ts +29 -0
- package/dist/esm/activity/schema/types/authorization.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/authorization.js +14 -0
- package/dist/esm/activity/schema/types/note.d.ts +51 -0
- package/dist/esm/activity/schema/types/note.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/note.js +14 -0
- package/dist/esm/activity/schema/types/operation.d.ts +31 -0
- package/dist/esm/activity/schema/types/operation.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/operation.js +15 -0
- package/dist/esm/activity/schema/types/unknown.d.ts +22 -0
- package/dist/esm/activity/schema/types/unknown.d.ts.map +1 -0
- package/dist/esm/activity/schema/types/unknown.js +6 -0
- package/dist/esm/activity/schema/utils.d.ts +7 -0
- package/dist/esm/activity/schema/utils.d.ts.map +1 -0
- package/dist/esm/activity/schema/utils.js +9 -0
- package/dist/esm/app/index.d.ts +2 -0
- package/dist/esm/app/index.d.ts.map +1 -0
- package/dist/esm/app/index.js +1 -0
- package/dist/esm/app/schema/app.d.ts +58 -0
- package/dist/esm/app/schema/app.d.ts.map +1 -0
- package/dist/esm/app/schema/app.js +40 -0
- package/dist/esm/app/schema/authorization.d.ts +37 -0
- package/dist/esm/app/schema/authorization.d.ts.map +1 -0
- package/dist/esm/app/schema/authorization.js +41 -0
- package/dist/esm/app/schema/oauth.d.ts +30 -0
- package/dist/esm/app/schema/oauth.d.ts.map +1 -0
- package/dist/esm/app/schema/oauth.js +18 -0
- package/dist/esm/app/schema/oidc.d.ts +28 -0
- package/dist/esm/app/schema/oidc.d.ts.map +1 -0
- package/dist/esm/app/schema/oidc.js +10 -0
- package/dist/esm/app/schema/registration.d.ts +22 -0
- package/dist/esm/app/schema/registration.d.ts.map +1 -0
- package/dist/esm/app/schema/registration.js +13 -0
- package/dist/esm/app/schema/saml.d.ts +28 -0
- package/dist/esm/app/schema/saml.d.ts.map +1 -0
- package/dist/esm/app/schema/saml.js +10 -0
- package/dist/esm/app/schema/schema.d.ts +8 -0
- package/dist/esm/app/schema/schema.d.ts.map +1 -0
- package/dist/esm/app/schema/schema.js +7 -0
- package/dist/esm/app/schema/utils.d.ts +11 -0
- package/dist/esm/app/schema/utils.d.ts.map +1 -0
- package/dist/esm/app/schema/utils.js +15 -0
- package/dist/esm/association/index.d.ts +2 -0
- package/dist/esm/association/index.d.ts.map +1 -0
- package/dist/esm/association/index.js +1 -0
- package/dist/esm/association/schema/association.d.ts +82 -0
- package/dist/esm/association/schema/association.d.ts.map +1 -0
- package/dist/esm/association/schema/association.js +23 -0
- package/dist/esm/association/schema/schema.d.ts +2 -0
- package/dist/esm/association/schema/schema.d.ts.map +1 -0
- package/dist/esm/association/schema/schema.js +1 -0
- package/dist/esm/authentication/index.d.ts +2 -0
- package/dist/esm/authentication/index.d.ts.map +1 -0
- package/dist/esm/authentication/index.js +1 -0
- package/dist/esm/authentication/schema/factors.d.ts +48 -0
- package/dist/esm/authentication/schema/factors.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.js +25 -0
- package/dist/esm/authentication/schema/factors.test.d.ts +2 -0
- package/dist/esm/authentication/schema/factors.test.d.ts.map +1 -0
- package/dist/esm/authentication/schema/factors.test.js +121 -0
- package/dist/esm/authentication/schema/provider.d.ts +27 -0
- package/dist/esm/authentication/schema/provider.d.ts.map +1 -0
- package/dist/esm/authentication/schema/provider.js +21 -0
- package/dist/esm/authentication/schema/schema.d.ts +6 -0
- package/dist/esm/authentication/schema/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/schema.js +5 -0
- package/dist/esm/authentication/schema/session.d.ts +59 -0
- package/dist/esm/authentication/schema/session.d.ts.map +1 -0
- package/dist/esm/authentication/schema/session.js +43 -0
- package/dist/esm/authentication/schema/settings.d.ts +46 -0
- package/dist/esm/authentication/schema/settings.d.ts.map +1 -0
- package/dist/esm/authentication/schema/settings.js +13 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts +54 -0
- package/dist/esm/authentication/schema/strategy/base.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/base.js +36 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts +158 -0
- package/dist/esm/authentication/schema/strategy/schema.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/schema.js +13 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts +44 -0
- package/dist/esm/authentication/schema/strategy/types/email.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/email.js +17 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts +99 -0
- package/dist/esm/authentication/schema/strategy/types/password.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/password.js +32 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts +91 -0
- package/dist/esm/authentication/schema/strategy/types/totp.d.ts.map +1 -0
- package/dist/esm/authentication/schema/strategy/types/totp.js +45 -0
- package/dist/esm/authorization/index.d.ts +6 -0
- package/dist/esm/authorization/index.d.ts.map +1 -0
- package/dist/esm/authorization/index.js +5 -0
- package/dist/esm/authorization/permissions/resources.d.ts +20 -0
- package/dist/esm/authorization/permissions/resources.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/resources.js +48 -0
- package/dist/esm/authorization/permissions/schema.d.ts +104 -0
- package/dist/esm/authorization/permissions/schema.d.ts.map +1 -0
- package/dist/esm/authorization/permissions/schema.js +63 -0
- package/dist/esm/authorization/roles/resources.d.ts +20 -0
- package/dist/esm/authorization/roles/resources.d.ts.map +1 -0
- package/dist/esm/authorization/roles/resources.js +48 -0
- package/dist/esm/authorization/roles/schema.d.ts +113 -0
- package/dist/esm/authorization/roles/schema.d.ts.map +1 -0
- package/dist/esm/authorization/roles/schema.js +69 -0
- package/dist/esm/authorization/utils.d.ts +11 -0
- package/dist/esm/authorization/utils.d.ts.map +1 -0
- package/dist/esm/authorization/utils.js +15 -0
- package/dist/esm/common/errors/http.d.ts +17 -0
- package/dist/esm/common/errors/http.d.ts.map +1 -0
- package/dist/esm/common/errors/http.js +14 -0
- package/dist/esm/common/errors/validation.d.ts +11 -0
- package/dist/esm/common/errors/validation.d.ts.map +1 -0
- package/dist/esm/common/errors/validation.js +8 -0
- package/dist/esm/common/index.d.ts +6 -0
- package/dist/esm/common/index.d.ts.map +1 -0
- package/dist/esm/common/index.js +5 -0
- package/dist/esm/common/resources/authorization.d.ts +2 -0
- package/dist/esm/common/resources/authorization.d.ts.map +1 -0
- package/dist/esm/common/resources/authorization.js +1 -0
- package/dist/esm/common/resources/init.d.ts +16 -0
- package/dist/esm/common/resources/init.d.ts.map +1 -0
- package/dist/esm/common/resources/init.js +34 -0
- package/dist/esm/common/resources/operations.d.ts +7 -0
- package/dist/esm/common/resources/operations.d.ts.map +1 -0
- package/dist/esm/common/resources/operations.js +83 -0
- package/dist/esm/common/resources/utils.d.ts +18 -0
- package/dist/esm/common/resources/utils.d.ts.map +1 -0
- package/dist/esm/common/resources/utils.js +86 -0
- package/dist/esm/common/schema/aggregate.d.ts +6 -0
- package/dist/esm/common/schema/aggregate.d.ts.map +1 -0
- package/dist/esm/common/schema/aggregate.js +5 -0
- package/dist/esm/common/schema/collection.d.ts +18 -0
- package/dist/esm/common/schema/collection.d.ts.map +1 -0
- package/dist/esm/common/schema/collection.js +7 -0
- package/dist/esm/common/schema/dates.d.ts +39 -0
- package/dist/esm/common/schema/dates.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.js +31 -0
- package/dist/esm/common/schema/dates.test.d.ts +2 -0
- package/dist/esm/common/schema/dates.test.d.ts.map +1 -0
- package/dist/esm/common/schema/dates.test.js +31 -0
- package/dist/esm/common/schema/jwt.d.ts +21 -0
- package/dist/esm/common/schema/jwt.d.ts.map +1 -0
- package/dist/esm/common/schema/jwt.js +21 -0
- package/dist/esm/common/schema/metadata.d.ts +47 -0
- package/dist/esm/common/schema/metadata.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.js +83 -0
- package/dist/esm/common/schema/metadata.test.d.ts +2 -0
- package/dist/esm/common/schema/metadata.test.d.ts.map +1 -0
- package/dist/esm/common/schema/metadata.test.js +60 -0
- package/dist/esm/common/schema/pagination.d.ts +6 -0
- package/dist/esm/common/schema/pagination.d.ts.map +1 -0
- package/dist/esm/common/schema/pagination.js +5 -0
- package/dist/esm/common/schema/schema.d.ts +8 -0
- package/dist/esm/common/schema/schema.d.ts.map +1 -0
- package/dist/esm/common/schema/schema.js +7 -0
- package/dist/esm/common/schema/sets.d.ts +3 -0
- package/dist/esm/common/schema/sets.d.ts.map +1 -0
- package/dist/esm/common/schema/sets.js +6 -0
- package/dist/esm/customer/index.d.ts +4 -0
- package/dist/esm/customer/index.d.ts.map +1 -0
- package/dist/esm/customer/index.js +3 -0
- package/dist/esm/customer/schema/organization.d.ts +54 -0
- package/dist/esm/customer/schema/organization.d.ts.map +1 -0
- package/dist/esm/customer/schema/organization.js +37 -0
- package/dist/esm/customer/schema/schema.d.ts +4 -0
- package/dist/esm/customer/schema/schema.d.ts.map +1 -0
- package/dist/esm/customer/schema/schema.js +3 -0
- package/dist/esm/customer/schema/utils.d.ts +11 -0
- package/dist/esm/customer/schema/utils.d.ts.map +1 -0
- package/dist/esm/customer/schema/utils.js +15 -0
- package/dist/esm/customer/users/resources.d.ts +20 -0
- package/dist/esm/customer/users/resources.d.ts.map +1 -0
- package/dist/esm/customer/users/resources.js +48 -0
- package/dist/esm/customer/users/schema.d.ts +151 -0
- package/dist/esm/customer/users/schema.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.js +88 -0
- package/dist/esm/customer/users/schema.test.d.ts +2 -0
- package/dist/esm/customer/users/schema.test.d.ts.map +1 -0
- package/dist/esm/customer/users/schema.test.js +55 -0
- package/dist/esm/identity/index.d.ts +2 -0
- package/dist/esm/identity/index.d.ts.map +1 -0
- package/dist/esm/identity/index.js +1 -0
- package/dist/esm/identity/schema/schema.d.ts +7 -0
- package/dist/esm/identity/schema/schema.d.ts.map +1 -0
- package/dist/esm/identity/schema/schema.js +6 -0
- package/dist/esm/oauth/authorize/index.d.ts +2 -0
- package/dist/esm/oauth/authorize/index.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/index.js +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts +29 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/authorization-code.js +31 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts +11 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/grants/implicit.js +18 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts +42 -0
- package/dist/esm/oauth/authorize/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/authorize/schema/schema.js +8 -0
- package/dist/esm/oauth/common/schema.d.ts +62 -0
- package/dist/esm/oauth/common/schema.d.ts.map +1 -0
- package/dist/esm/oauth/common/schema.js +51 -0
- package/dist/esm/oauth/index.d.ts +4 -0
- package/dist/esm/oauth/index.d.ts.map +1 -0
- package/dist/esm/oauth/index.js +3 -0
- package/dist/esm/oauth/token/index.d.ts +2 -0
- package/dist/esm/oauth/token/index.d.ts.map +1 -0
- package/dist/esm/oauth/token/index.js +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts +10 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/authorization-code.js +17 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts +21 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/client-credentials.js +22 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts +9 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/grants/refresh-token.js +14 -0
- package/dist/esm/oauth/token/schema/schema.d.ts +28 -0
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -0
- package/dist/esm/oauth/token/schema/schema.js +10 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/workspace/index.d.ts +2 -0
- package/dist/esm/workspace/index.d.ts.map +1 -0
- package/dist/esm/workspace/index.js +1 -0
- package/dist/esm/workspace/schema/authorization.d.ts +31 -0
- package/dist/esm/workspace/schema/authorization.d.ts.map +1 -0
- package/dist/esm/workspace/schema/authorization.js +19 -0
- package/dist/esm/workspace/schema/branding.d.ts +38 -0
- package/dist/esm/workspace/schema/branding.d.ts.map +1 -0
- package/dist/esm/workspace/schema/branding.js +22 -0
- package/dist/esm/workspace/schema/membership.d.ts +25 -0
- package/dist/esm/workspace/schema/membership.d.ts.map +1 -0
- package/dist/esm/workspace/schema/membership.js +16 -0
- package/dist/esm/workspace/schema/registration.d.ts +28 -0
- package/dist/esm/workspace/schema/registration.d.ts.map +1 -0
- package/dist/esm/workspace/schema/registration.js +19 -0
- package/dist/esm/workspace/schema/schema.d.ts +10 -0
- package/dist/esm/workspace/schema/schema.d.ts.map +1 -0
- package/dist/esm/workspace/schema/schema.js +9 -0
- package/dist/esm/workspace/schema/settings.d.ts +23 -0
- package/dist/esm/workspace/schema/settings.d.ts.map +1 -0
- package/dist/esm/workspace/schema/settings.js +12 -0
- package/dist/esm/workspace/schema/tenant.d.ts +57 -0
- package/dist/esm/workspace/schema/tenant.d.ts.map +1 -0
- package/dist/esm/workspace/schema/tenant.js +23 -0
- package/dist/esm/workspace/schema/user-notification.d.ts +62 -0
- package/dist/esm/workspace/schema/user-notification.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-notification.js +41 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts +26 -0
- package/dist/esm/workspace/schema/user-preferences.d.ts.map +1 -0
- package/dist/esm/workspace/schema/user-preferences.js +16 -0
- package/dist/esm/workspace/schema/utils.d.ts +15 -0
- package/dist/esm/workspace/schema/utils.d.ts.map +1 -0
- package/dist/esm/workspace/schema/utils.js +22 -0
- package/package.json +50 -55
- package/release-please-config.json +13 -3
- package/tsconfig.esm.json +1 -1
- package/tsconfig.json +26 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/oauth/authorize/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema/schema.js"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const AuthorizationCodeSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
2
|
+
response_type: "code";
|
|
3
|
+
client_id: string;
|
|
4
|
+
redirect_uri?: string | undefined;
|
|
5
|
+
scope?: string | undefined;
|
|
6
|
+
state?: string | undefined;
|
|
7
|
+
nonce?: string | undefined;
|
|
8
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
|
9
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
|
10
|
+
max_age?: number | undefined;
|
|
11
|
+
code_challenge_method?: "S256" | "plain" | undefined;
|
|
12
|
+
code_challenge?: string | undefined;
|
|
13
|
+
audience?: string | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
response_type: "code";
|
|
16
|
+
client_id: string;
|
|
17
|
+
redirect_uri?: string | undefined;
|
|
18
|
+
scope?: string | undefined;
|
|
19
|
+
state?: string | undefined;
|
|
20
|
+
nonce?: string | undefined;
|
|
21
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
|
22
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
|
23
|
+
max_age?: number | undefined;
|
|
24
|
+
code_challenge_method: "S256" | "plain";
|
|
25
|
+
code_challenge: string;
|
|
26
|
+
audience?: string | undefined;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export type AuthorizationCodePayload = typeof AuthorizationCodeSchema.inferOut;
|
|
29
|
+
//# sourceMappingURL=authorization-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-code.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/authorize/schema/grants/authorization-code.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;MAEd,CAAC;AACvB,MAAM,MAAM,wBAAwB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationCodeSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const app_js_1 = require("../../../../app/schema/app.js");
|
|
6
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
7
|
+
/**
|
|
8
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
|
|
9
|
+
* @see https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.1
|
|
10
|
+
*/
|
|
11
|
+
const ResponseTypeSchema = arktype_1.type.enumerated(schema_js_1.ResponseType.CODE);
|
|
12
|
+
const PKCESchema = (0, arktype_1.type)({
|
|
13
|
+
code_challenge_method: schema_js_1.CodeChallengeMethodSchema.optional(),
|
|
14
|
+
code_challenge: (0, arktype_1.type)('string').optional(),
|
|
15
|
+
}).or({
|
|
16
|
+
code_challenge_method: schema_js_1.CodeChallengeMethodSchema,
|
|
17
|
+
code_challenge: (0, arktype_1.type)('string'),
|
|
18
|
+
});
|
|
19
|
+
const OAuthSchema = (0, arktype_1.type)({
|
|
20
|
+
response_type: ResponseTypeSchema,
|
|
21
|
+
client_id: app_js_1.AppIdSchema,
|
|
22
|
+
redirect_uri: (0, arktype_1.type)('string.url').optional(),
|
|
23
|
+
scope: (0, arktype_1.type)('string').optional(),
|
|
24
|
+
state: (0, arktype_1.type)('string').optional(),
|
|
25
|
+
});
|
|
26
|
+
const OIDCSchema = (0, arktype_1.type)({
|
|
27
|
+
nonce: (0, arktype_1.type)('string').optional(),
|
|
28
|
+
display: schema_js_1.AuthorizationDisplaySchema.optional(),
|
|
29
|
+
prompt: schema_js_1.AuthorizationPromptSchema.optional(),
|
|
30
|
+
max_age: (0, arktype_1.type)('number').optional(),
|
|
31
|
+
});
|
|
32
|
+
exports.AuthorizationCodeSchema = OAuthSchema.and(OIDCSchema)
|
|
33
|
+
.and(PKCESchema)
|
|
34
|
+
.and(schema_js_1.OptionalSchema);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ImplicitSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
2
|
+
response_type: "token" | "id_token" | "string string" | "string number" | "string bigint" | "string boolean" | "string symbol" | "string undefined" | "string object" | "string function" | "number string" | "number number" | "number bigint" | "number boolean" | "number symbol" | "number undefined" | "number object" | "number function" | "bigint string" | "bigint number" | "bigint bigint" | "bigint boolean" | "bigint symbol" | "bigint undefined" | "bigint object" | "bigint function" | "boolean string" | "boolean number" | "boolean bigint" | "boolean boolean" | "boolean symbol" | "boolean undefined" | "boolean object" | "boolean function" | "symbol string" | "symbol number" | "symbol bigint" | "symbol boolean" | "symbol symbol" | "symbol undefined" | "symbol object" | "symbol function" | "undefined string" | "undefined number" | "undefined bigint" | "undefined boolean" | "undefined symbol" | "undefined undefined" | "undefined object" | "undefined function" | "object string" | "object number" | "object bigint" | "object boolean" | "object symbol" | "object undefined" | "object object" | "object function" | "function string" | "function number" | "function bigint" | "function boolean" | "function symbol" | "function undefined" | "function object" | "function function";
|
|
3
|
+
client_id: string;
|
|
4
|
+
redirect_uri?: string | undefined;
|
|
5
|
+
scope?: string | undefined;
|
|
6
|
+
state?: string | undefined;
|
|
7
|
+
nonce?: string | undefined;
|
|
8
|
+
audience?: string | undefined;
|
|
9
|
+
}, {}>;
|
|
10
|
+
export type ImplicitPayload = typeof ImplicitSchema.inferOut;
|
|
11
|
+
//# sourceMappingURL=implicit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implicit.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/authorize/schema/grants/implicit.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,cAAc;;;;;;;;MAAkD,CAAC;AAC9E,MAAM,MAAM,eAAe,GAAG,OAAO,cAAc,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImplicitSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
6
|
+
/**
|
|
7
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.2.1
|
|
8
|
+
* @see https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.2.2.1
|
|
9
|
+
*/
|
|
10
|
+
const ResponseTypeSchema = arktype_1.type.enumerated(schema_js_1.ResponseType.TOKEN, schema_js_1.ResponseType.ID_TOKEN, `${typeof schema_js_1.ResponseType.ID_TOKEN} ${typeof schema_js_1.ResponseType.TOKEN}`, `${typeof schema_js_1.ResponseType.TOKEN} ${typeof schema_js_1.ResponseType.ID_TOKEN}`);
|
|
11
|
+
const OAuthSchema = (0, arktype_1.type)({
|
|
12
|
+
response_type: ResponseTypeSchema,
|
|
13
|
+
client_id: (0, arktype_1.type)('string'),
|
|
14
|
+
redirect_uri: (0, arktype_1.type)('string.url').optional(),
|
|
15
|
+
scope: (0, arktype_1.type)('string').optional(),
|
|
16
|
+
state: (0, arktype_1.type)('string').optional(),
|
|
17
|
+
});
|
|
18
|
+
const OIDCSchema = (0, arktype_1.type)({
|
|
19
|
+
nonce: (0, arktype_1.type)('string').optional(), // OIDC (this is required if resposne_type includes ID TOKEN)
|
|
20
|
+
});
|
|
21
|
+
exports.ImplicitSchema = OAuthSchema.and(OIDCSchema).and(schema_js_1.OptionalSchema);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export * from './grants/authorization-code.js';
|
|
2
|
+
export * from './grants/implicit.js';
|
|
3
|
+
/**
|
|
4
|
+
* Union(s)
|
|
5
|
+
*/
|
|
6
|
+
export declare const Schema: import("arktype/out/methods/object.js").ObjectType<{
|
|
7
|
+
response_type: "code";
|
|
8
|
+
client_id: string;
|
|
9
|
+
redirect_uri?: string | undefined;
|
|
10
|
+
scope?: string | undefined;
|
|
11
|
+
state?: string | undefined;
|
|
12
|
+
nonce?: string | undefined;
|
|
13
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
|
14
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
|
15
|
+
max_age?: number | undefined;
|
|
16
|
+
code_challenge_method?: "S256" | "plain" | undefined;
|
|
17
|
+
code_challenge?: string | undefined;
|
|
18
|
+
audience?: string | undefined;
|
|
19
|
+
} | {
|
|
20
|
+
response_type: "code";
|
|
21
|
+
client_id: string;
|
|
22
|
+
redirect_uri?: string | undefined;
|
|
23
|
+
scope?: string | undefined;
|
|
24
|
+
state?: string | undefined;
|
|
25
|
+
nonce?: string | undefined;
|
|
26
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
|
27
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
|
28
|
+
max_age?: number | undefined;
|
|
29
|
+
code_challenge_method: "S256" | "plain";
|
|
30
|
+
code_challenge: string;
|
|
31
|
+
audience?: string | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
response_type: "token" | "id_token" | "string string" | "string number" | "string bigint" | "string boolean" | "string symbol" | "string undefined" | "string object" | "string function" | "number string" | "number number" | "number bigint" | "number boolean" | "number symbol" | "number undefined" | "number object" | "number function" | "bigint string" | "bigint number" | "bigint bigint" | "bigint boolean" | "bigint symbol" | "bigint undefined" | "bigint object" | "bigint function" | "boolean string" | "boolean number" | "boolean bigint" | "boolean boolean" | "boolean symbol" | "boolean undefined" | "boolean object" | "boolean function" | "symbol string" | "symbol number" | "symbol bigint" | "symbol boolean" | "symbol symbol" | "symbol undefined" | "symbol object" | "symbol function" | "undefined string" | "undefined number" | "undefined bigint" | "undefined boolean" | "undefined symbol" | "undefined undefined" | "undefined object" | "undefined function" | "object string" | "object number" | "object bigint" | "object boolean" | "object symbol" | "object undefined" | "object object" | "object function" | "function string" | "function number" | "function bigint" | "function boolean" | "function symbol" | "function undefined" | "function object" | "function function";
|
|
34
|
+
client_id: string;
|
|
35
|
+
redirect_uri?: string | undefined;
|
|
36
|
+
scope?: string | undefined;
|
|
37
|
+
state?: string | undefined;
|
|
38
|
+
nonce?: string | undefined;
|
|
39
|
+
audience?: string | undefined;
|
|
40
|
+
}, {}>;
|
|
41
|
+
export type Payload = typeof Schema.inferOut;
|
|
42
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/authorize/schema/schema.ts"],"names":[],"mappings":"AAGA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA6C,CAAC;AACjE,MAAM,MAAM,OAAO,GAAG,OAAO,MAAM,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Schema = void 0;
|
|
18
|
+
const authorization_code_js_1 = require("./grants/authorization-code.js");
|
|
19
|
+
const implicit_js_1 = require("./grants/implicit.js");
|
|
20
|
+
__exportStar(require("./grants/authorization-code.js"), exports);
|
|
21
|
+
__exportStar(require("./grants/implicit.js"), exports);
|
|
22
|
+
/**
|
|
23
|
+
* Union(s)
|
|
24
|
+
*/
|
|
25
|
+
exports.Schema = authorization_code_js_1.AuthorizationCodeSchema.or(implicit_js_1.ImplicitSchema);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const GrantType: {
|
|
2
|
+
readonly CLIENT_CREDENTIALS: "client_credentials";
|
|
3
|
+
readonly AUTHORIZATION_CODE: "authorization_code";
|
|
4
|
+
readonly IMPLICIT: "implicit";
|
|
5
|
+
readonly REFRESH_TOKEN: "refresh_token";
|
|
6
|
+
};
|
|
7
|
+
export type AnyGrantType = (typeof GrantType)[keyof typeof GrantType];
|
|
8
|
+
export declare const ResponseType: {
|
|
9
|
+
readonly ID_TOKEN: "id_token";
|
|
10
|
+
readonly TOKEN: "token";
|
|
11
|
+
readonly CODE: "code";
|
|
12
|
+
};
|
|
13
|
+
export type AnyResponseType = (typeof ResponseType)[keyof typeof ResponseType];
|
|
14
|
+
export declare const CodeChallengeMethod: {
|
|
15
|
+
readonly DEFAULT: "S256";
|
|
16
|
+
readonly S256: "S256";
|
|
17
|
+
readonly PLAIN: "plain";
|
|
18
|
+
};
|
|
19
|
+
export type AnyCodeChallengeMethod = (typeof CodeChallengeMethod)[keyof typeof CodeChallengeMethod];
|
|
20
|
+
export declare const CodeChallengeMethodSchema: import("arktype/out/methods/string").StringType<"S256" | "plain", {}>;
|
|
21
|
+
export declare const AuthorizationDisplay: {
|
|
22
|
+
readonly PAGE: "page";
|
|
23
|
+
readonly POPUP: "popup";
|
|
24
|
+
readonly TOUCH: "touch";
|
|
25
|
+
readonly WAP: "wap";
|
|
26
|
+
};
|
|
27
|
+
export type AnyAuthorizationDisplay = (typeof AuthorizationDisplay)[keyof typeof AuthorizationDisplay];
|
|
28
|
+
export declare const AuthorizationDisplaySchema: import("arktype/out/methods/string").StringType<"page" | "popup" | "touch" | "wap", {}>;
|
|
29
|
+
export declare const AuthorizationPrompt: {
|
|
30
|
+
readonly NONE: "none";
|
|
31
|
+
readonly LOGIN: "login";
|
|
32
|
+
readonly CONSENT: "consent";
|
|
33
|
+
readonly SELECT_ACCOUNT: "select_account";
|
|
34
|
+
};
|
|
35
|
+
export type AnyAuthorizationPrompt = (typeof AuthorizationPrompt)[keyof typeof AuthorizationPrompt];
|
|
36
|
+
export declare const AuthorizationPromptSchema: import("arktype/out/methods/string").StringType<"none" | "login" | "consent" | "select_account", {}>;
|
|
37
|
+
export declare const OptionalSchema: import("arktype/out/methods/object").ObjectType<{
|
|
38
|
+
audience?: string | undefined;
|
|
39
|
+
}, {}>;
|
|
40
|
+
export declare const OIDCScope: {
|
|
41
|
+
readonly OPENID: "openid";
|
|
42
|
+
readonly PROFILE: "profile";
|
|
43
|
+
readonly EMAIL: "email";
|
|
44
|
+
readonly ADDRESS: "address";
|
|
45
|
+
readonly PHONE: "phone";
|
|
46
|
+
};
|
|
47
|
+
export type AnyOIDCScope = (typeof OIDCScope)[keyof typeof OIDCScope];
|
|
48
|
+
export declare const OAuthScope: {
|
|
49
|
+
readonly OFFLINE_ACCESS: "offline_access";
|
|
50
|
+
};
|
|
51
|
+
export type AnyOAuthScope = (typeof OAuthScope)[keyof typeof OAuthScope];
|
|
52
|
+
export declare const Scope: {
|
|
53
|
+
OFFLINE_ACCESS: "offline_access";
|
|
54
|
+
OPENID: "openid";
|
|
55
|
+
PROFILE: "profile";
|
|
56
|
+
EMAIL: "email";
|
|
57
|
+
ADDRESS: "address";
|
|
58
|
+
PHONE: "phone";
|
|
59
|
+
};
|
|
60
|
+
export type AnyScope = AnyOAuthScope | AnyOIDCScope | string;
|
|
61
|
+
export declare const ScopeSchema: import("arktype/out/methods/string").StringType<string, {}>;
|
|
62
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/oauth/common/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEtE,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAG/E,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AACjE,eAAO,MAAM,yBAAyB,uEAGrC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AACnE,eAAO,MAAM,0BAA0B,yFAKtC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AACjE,eAAO,MAAM,yBAAyB,sGAKrC,CAAC;AAEF,eAAO,MAAM,cAAc;;MAEzB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEtE,eAAO,MAAM,UAAU;;CAEb,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEzE,eAAO,MAAM,KAAK;;;;;;;CAGjB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;AAC7D,eAAO,MAAM,WAAW,6DAAiB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeSchema = exports.Scope = exports.OAuthScope = exports.OIDCScope = exports.OptionalSchema = exports.AuthorizationPromptSchema = exports.AuthorizationPrompt = exports.AuthorizationDisplaySchema = exports.AuthorizationDisplay = exports.CodeChallengeMethodSchema = exports.CodeChallengeMethod = exports.ResponseType = exports.GrantType = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
exports.GrantType = {
|
|
6
|
+
CLIENT_CREDENTIALS: 'client_credentials',
|
|
7
|
+
AUTHORIZATION_CODE: 'authorization_code',
|
|
8
|
+
IMPLICIT: 'implicit',
|
|
9
|
+
REFRESH_TOKEN: 'refresh_token',
|
|
10
|
+
};
|
|
11
|
+
exports.ResponseType = {
|
|
12
|
+
ID_TOKEN: 'id_token',
|
|
13
|
+
TOKEN: 'token',
|
|
14
|
+
CODE: 'code',
|
|
15
|
+
};
|
|
16
|
+
// export const ResponseTypeSchema = type.enumerated(ResponseType.CODE, ResponseType.ID_TOKEN, ResponseType.TOKEN)
|
|
17
|
+
exports.CodeChallengeMethod = {
|
|
18
|
+
DEFAULT: 'S256',
|
|
19
|
+
S256: 'S256',
|
|
20
|
+
PLAIN: 'plain',
|
|
21
|
+
};
|
|
22
|
+
exports.CodeChallengeMethodSchema = arktype_1.type.enumerated(exports.CodeChallengeMethod.PLAIN, exports.CodeChallengeMethod.S256);
|
|
23
|
+
exports.AuthorizationDisplay = {
|
|
24
|
+
PAGE: 'page',
|
|
25
|
+
POPUP: 'popup',
|
|
26
|
+
TOUCH: 'touch',
|
|
27
|
+
WAP: 'wap',
|
|
28
|
+
};
|
|
29
|
+
exports.AuthorizationDisplaySchema = arktype_1.type.enumerated(exports.AuthorizationDisplay.PAGE, exports.AuthorizationDisplay.POPUP, exports.AuthorizationDisplay.TOUCH, exports.AuthorizationDisplay.WAP);
|
|
30
|
+
exports.AuthorizationPrompt = {
|
|
31
|
+
NONE: 'none',
|
|
32
|
+
LOGIN: 'login',
|
|
33
|
+
CONSENT: 'consent',
|
|
34
|
+
SELECT_ACCOUNT: 'select_account',
|
|
35
|
+
};
|
|
36
|
+
exports.AuthorizationPromptSchema = arktype_1.type.enumerated(exports.AuthorizationPrompt.NONE, exports.AuthorizationPrompt.LOGIN, exports.AuthorizationPrompt.CONSENT, exports.AuthorizationPrompt.SELECT_ACCOUNT);
|
|
37
|
+
exports.OptionalSchema = (0, arktype_1.type)({
|
|
38
|
+
audience: (0, arktype_1.type)('string').optional(),
|
|
39
|
+
});
|
|
40
|
+
exports.OIDCScope = {
|
|
41
|
+
OPENID: 'openid',
|
|
42
|
+
PROFILE: 'profile',
|
|
43
|
+
EMAIL: 'email',
|
|
44
|
+
ADDRESS: 'address',
|
|
45
|
+
PHONE: 'phone',
|
|
46
|
+
};
|
|
47
|
+
exports.OAuthScope = {
|
|
48
|
+
OFFLINE_ACCESS: 'offline_access',
|
|
49
|
+
};
|
|
50
|
+
exports.Scope = {
|
|
51
|
+
...exports.OIDCScope,
|
|
52
|
+
...exports.OAuthScope,
|
|
53
|
+
};
|
|
54
|
+
exports.ScopeSchema = (0, arktype_1.type)('string');
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AuthorizationDisplay, AuthorizationDisplaySchema, AuthorizationPrompt, AuthorizationPromptSchema, CodeChallengeMethod, CodeChallengeMethodSchema, GrantType, OAuthScope, OIDCScope, ResponseType, type AnyAuthorizationDisplay, type AnyAuthorizationPrompt, type AnyCodeChallengeMethod, type AnyGrantType, type AnyOAuthScope, type AnyOIDCScope, type AnyResponseType, type AnyScope, } from './common/schema.js';
|
|
2
|
+
export * as Authorize from './authorize/index.js';
|
|
3
|
+
export * as Token from './token/index.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/oauth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,QAAQ,GACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Token = exports.Authorize = exports.ResponseType = exports.OIDCScope = exports.OAuthScope = exports.GrantType = exports.CodeChallengeMethodSchema = exports.CodeChallengeMethod = exports.AuthorizationPromptSchema = exports.AuthorizationPrompt = exports.AuthorizationDisplaySchema = exports.AuthorizationDisplay = void 0;
|
|
37
|
+
var schema_js_1 = require("./common/schema.js");
|
|
38
|
+
Object.defineProperty(exports, "AuthorizationDisplay", { enumerable: true, get: function () { return schema_js_1.AuthorizationDisplay; } });
|
|
39
|
+
Object.defineProperty(exports, "AuthorizationDisplaySchema", { enumerable: true, get: function () { return schema_js_1.AuthorizationDisplaySchema; } });
|
|
40
|
+
Object.defineProperty(exports, "AuthorizationPrompt", { enumerable: true, get: function () { return schema_js_1.AuthorizationPrompt; } });
|
|
41
|
+
Object.defineProperty(exports, "AuthorizationPromptSchema", { enumerable: true, get: function () { return schema_js_1.AuthorizationPromptSchema; } });
|
|
42
|
+
Object.defineProperty(exports, "CodeChallengeMethod", { enumerable: true, get: function () { return schema_js_1.CodeChallengeMethod; } });
|
|
43
|
+
Object.defineProperty(exports, "CodeChallengeMethodSchema", { enumerable: true, get: function () { return schema_js_1.CodeChallengeMethodSchema; } });
|
|
44
|
+
Object.defineProperty(exports, "GrantType", { enumerable: true, get: function () { return schema_js_1.GrantType; } });
|
|
45
|
+
Object.defineProperty(exports, "OAuthScope", { enumerable: true, get: function () { return schema_js_1.OAuthScope; } });
|
|
46
|
+
Object.defineProperty(exports, "OIDCScope", { enumerable: true, get: function () { return schema_js_1.OIDCScope; } });
|
|
47
|
+
Object.defineProperty(exports, "ResponseType", { enumerable: true, get: function () { return schema_js_1.ResponseType; } });
|
|
48
|
+
exports.Authorize = __importStar(require("./authorize/index.js"));
|
|
49
|
+
exports.Token = __importStar(require("./token/index.js"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/oauth/token/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema/schema.js"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const AuthorizationCodeSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
2
|
+
grant_type: "authorization_code";
|
|
3
|
+
code: string;
|
|
4
|
+
client_id: string;
|
|
5
|
+
redirect_uri: string;
|
|
6
|
+
client_secret?: string | undefined;
|
|
7
|
+
code_verifier?: string | undefined;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export type AuthorizationCodePayload = typeof AuthorizationCodeSchema.inferOut;
|
|
10
|
+
//# sourceMappingURL=authorization-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-code.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/authorization-code.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,uBAAuB;;;;;;;MAMlB,CAAC;AACnB,MAAM,MAAM,wBAAwB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationCodeSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
6
|
+
/**
|
|
7
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
|
|
8
|
+
* @see https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.3.1
|
|
9
|
+
*/
|
|
10
|
+
const GrantTypeSchema = arktype_1.type.enumerated(schema_js_1.GrantType.AUTHORIZATION_CODE);
|
|
11
|
+
const PKCESchema = (0, arktype_1.type)({
|
|
12
|
+
code_verifier: (0, arktype_1.type)('string').optional(),
|
|
13
|
+
});
|
|
14
|
+
exports.AuthorizationCodeSchema = (0, arktype_1.type)({
|
|
15
|
+
grant_type: GrantTypeSchema,
|
|
16
|
+
code: (0, arktype_1.type)('string'),
|
|
17
|
+
client_id: (0, arktype_1.type)('string'),
|
|
18
|
+
client_secret: (0, arktype_1.type)('string').optional(),
|
|
19
|
+
redirect_uri: (0, arktype_1.type)('string.url'),
|
|
20
|
+
}).and(PKCESchema);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the incoming body may look like.
|
|
3
|
+
*
|
|
4
|
+
* Note: the client_id and client_secrete may (likely) be in Authorization header
|
|
5
|
+
*/
|
|
6
|
+
export declare const ClientCredentialsPayloadSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
7
|
+
grant_type: "client_credentials";
|
|
8
|
+
scope?: string | undefined;
|
|
9
|
+
client_id?: string | undefined;
|
|
10
|
+
client_secret?: string | undefined;
|
|
11
|
+
audience?: string | undefined;
|
|
12
|
+
}, {}>;
|
|
13
|
+
export declare const ClientCredentialsSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
14
|
+
grant_type: "client_credentials";
|
|
15
|
+
scope?: string | undefined;
|
|
16
|
+
audience?: string | undefined;
|
|
17
|
+
client_id: string;
|
|
18
|
+
client_secret: string;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export type ClientCredentialsPayload = typeof ClientCredentialsSchema.inferOut;
|
|
21
|
+
//# sourceMappingURL=client-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-credentials.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/client-credentials.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;MAKrB,CAAC;AAEvB,eAAO,MAAM,uBAAuB;;;;;;MAMlC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,uBAAuB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientCredentialsSchema = exports.ClientCredentialsPayloadSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const app_js_1 = require("../../../../app/schema/app.js");
|
|
6
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
7
|
+
/**
|
|
8
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.2
|
|
9
|
+
*/
|
|
10
|
+
const GrantTypeSchema = arktype_1.type.enumerated(schema_js_1.GrantType.CLIENT_CREDENTIALS);
|
|
11
|
+
/**
|
|
12
|
+
* What the incoming body may look like.
|
|
13
|
+
*
|
|
14
|
+
* Note: the client_id and client_secrete may (likely) be in Authorization header
|
|
15
|
+
*/
|
|
16
|
+
exports.ClientCredentialsPayloadSchema = (0, arktype_1.type)({
|
|
17
|
+
grant_type: GrantTypeSchema,
|
|
18
|
+
scope: (0, arktype_1.type)('string').optional(),
|
|
19
|
+
client_id: app_js_1.AppIdSchema.optional(),
|
|
20
|
+
client_secret: (0, arktype_1.type)('string').optional(),
|
|
21
|
+
}).and(schema_js_1.OptionalSchema);
|
|
22
|
+
exports.ClientCredentialsSchema = exports.ClientCredentialsPayloadSchema.omit('client_id', 'client_secret').and({
|
|
23
|
+
client_id: app_js_1.AppIdSchema,
|
|
24
|
+
client_secret: (0, arktype_1.type)('string'),
|
|
25
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const RefreshTokenSchema: import("arktype/out/methods/object.js").ObjectType<{
|
|
2
|
+
grant_type: "refresh_token";
|
|
3
|
+
refresh_token: string;
|
|
4
|
+
client_id: string;
|
|
5
|
+
client_secret: string;
|
|
6
|
+
scope?: string | undefined;
|
|
7
|
+
}, {}>;
|
|
8
|
+
export type RefreshTokenPayload = typeof RefreshTokenSchema.inferOut;
|
|
9
|
+
//# sourceMappingURL=refresh-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-token.d.ts","sourceRoot":"","sources":["../../../../../../src/oauth/token/schema/grants/refresh-token.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB;;;;;;MAM7B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,kBAAkB,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefreshTokenSchema = void 0;
|
|
4
|
+
const arktype_1 = require("arktype");
|
|
5
|
+
const app_js_1 = require("../../../../app/schema/app.js");
|
|
6
|
+
const schema_js_1 = require("../../../common/schema.js");
|
|
7
|
+
/**
|
|
8
|
+
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-6
|
|
9
|
+
*/
|
|
10
|
+
const GrantTypeSchema = arktype_1.type.enumerated(schema_js_1.GrantType.REFRESH_TOKEN);
|
|
11
|
+
exports.RefreshTokenSchema = (0, arktype_1.type)({
|
|
12
|
+
grant_type: GrantTypeSchema,
|
|
13
|
+
refresh_token: (0, arktype_1.type)('string'),
|
|
14
|
+
scope: (0, arktype_1.type)('string').optional(),
|
|
15
|
+
client_id: app_js_1.AppIdSchema,
|
|
16
|
+
client_secret: (0, arktype_1.type)('string'),
|
|
17
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './grants/authorization-code.js';
|
|
2
|
+
export * from './grants/client-credentials.js';
|
|
3
|
+
export * from './grants/refresh-token.js';
|
|
4
|
+
/**
|
|
5
|
+
* Union(s)
|
|
6
|
+
*/
|
|
7
|
+
export declare const Schema: import("arktype/out/methods/object.js").ObjectType<{
|
|
8
|
+
grant_type: "authorization_code";
|
|
9
|
+
code: string;
|
|
10
|
+
client_id: string;
|
|
11
|
+
redirect_uri: string;
|
|
12
|
+
client_secret?: string | undefined;
|
|
13
|
+
code_verifier?: string | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
grant_type: "client_credentials";
|
|
16
|
+
scope?: string | undefined;
|
|
17
|
+
audience?: string | undefined;
|
|
18
|
+
client_id: string;
|
|
19
|
+
client_secret: string;
|
|
20
|
+
} | {
|
|
21
|
+
grant_type: "refresh_token";
|
|
22
|
+
refresh_token: string;
|
|
23
|
+
client_id: string;
|
|
24
|
+
client_secret: string;
|
|
25
|
+
scope?: string | undefined;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export type Payload = typeof Schema.inferOut;
|
|
28
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAIA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;MAElB,CAAC;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,MAAM,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Schema = void 0;
|
|
18
|
+
const authorization_code_js_1 = require("./grants/authorization-code.js");
|
|
19
|
+
const client_credentials_js_1 = require("./grants/client-credentials.js");
|
|
20
|
+
const refresh_token_js_1 = require("./grants/refresh-token.js");
|
|
21
|
+
__exportStar(require("./grants/authorization-code.js"), exports);
|
|
22
|
+
__exportStar(require("./grants/client-credentials.js"), exports);
|
|
23
|
+
__exportStar(require("./grants/refresh-token.js"), exports);
|
|
24
|
+
/**
|
|
25
|
+
* Union(s)
|
|
26
|
+
*/
|
|
27
|
+
exports.Schema = authorization_code_js_1.AuthorizationCodeSchema.or(client_credentials_js_1.ClientCredentialsSchema).or(refresh_token_js_1.RefreshTokenSchema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|