@authup/server-core 1.0.0-beta.62 → 1.0.0-beta.64
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/dist/adapters/database/data-source/options/module.d.ts +1 -0
- package/dist/adapters/database/data-source/options/module.d.ts.map +1 -1
- package/dist/adapters/database/data-source/options/module.mjs +33 -4
- package/dist/adapters/database/data-source/options/module.mjs.map +1 -1
- package/dist/adapters/database/domains/client/entity.d.ts +1 -2
- package/dist/adapters/database/domains/client/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/client/entity.mjs +7 -14
- package/dist/adapters/database/domains/client/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts +9 -1
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs +14 -0
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/session/entity.d.ts +8 -0
- package/dist/adapters/database/domains/session/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/session/entity.mjs +19 -0
- package/dist/adapters/database/domains/session/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/user/entity.d.ts +1 -0
- package/dist/adapters/database/domains/user/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/user/entity.mjs +6 -0
- package/dist/adapters/database/domains/user/entity.mjs.map +1 -1
- package/dist/adapters/database/extra-attribute-repository/repository.mjs +1 -1
- package/dist/adapters/database/extra-attribute-repository/repository.mjs.map +1 -1
- package/dist/adapters/database/extra-attribute-repository/tree/adapter.mjs +4 -2
- package/dist/adapters/database/extra-attribute-repository/tree/adapter.mjs.map +1 -1
- package/dist/adapters/database/extra-attribute-repository/tree/repository.mjs +1 -1
- package/dist/adapters/database/extra-attribute-repository/tree/repository.mjs.map +1 -1
- package/dist/adapters/database/index.mjs +3 -3
- package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.d.ts +56 -0
- package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.d.ts.map +1 -0
- package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.mjs +105 -0
- package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.mjs.map +1 -0
- package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.d.ts +56 -0
- package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.d.ts.map +1 -0
- package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.mjs +104 -0
- package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.mjs.map +1 -0
- package/dist/adapters/database/subscriber/module.d.ts +6 -2
- package/dist/adapters/database/subscriber/module.d.ts.map +1 -1
- package/dist/adapters/database/subscriber/module.mjs +9 -5
- package/dist/adapters/database/subscriber/module.mjs.map +1 -1
- package/dist/adapters/http/adapters/oauth2/authorization/module.mjs +1 -1
- package/dist/adapters/http/adapters/oauth2/authorization/module.mjs.map +1 -1
- package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.d.ts.map +1 -1
- package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.mjs +8 -2
- package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.mjs.map +1 -1
- package/dist/adapters/http/constants.d.ts +18 -0
- package/dist/adapters/http/constants.d.ts.map +1 -0
- package/dist/adapters/http/constants.mjs +23 -0
- package/dist/adapters/http/constants.mjs.map +1 -0
- package/dist/adapters/http/controllers/entities/client/module.mjs +1 -1
- package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts +23 -1
- package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/identity-provider/module.mjs +86 -47
- package/dist/adapters/http/controllers/entities/identity-provider/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts +6 -0
- package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/realm/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/realm/module.mjs +2 -0
- package/dist/adapters/http/controllers/entities/realm/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/entities/session/module.d.ts +33 -1
- package/dist/adapters/http/controllers/entities/session/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/entities/session/module.mjs +74 -0
- package/dist/adapters/http/controllers/entities/session/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/index.mjs +3 -1
- package/dist/adapters/http/controllers/workflows/account/index.d.ts +1 -0
- package/dist/adapters/http/controllers/workflows/account/index.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/account/module.d.ts +25 -16
- package/dist/adapters/http/controllers/workflows/account/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/account/module.mjs +40 -17
- package/dist/adapters/http/controllers/workflows/account/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/account/types.d.ts +33 -0
- package/dist/adapters/http/controllers/workflows/account/types.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/activate/module.d.ts +8 -4
- package/dist/adapters/http/controllers/workflows/activate/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/activate/module.mjs +7 -9
- package/dist/adapters/http/controllers/workflows/activate/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/admin/index.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/admin/index.mjs +5 -0
- package/dist/adapters/http/controllers/workflows/admin/module.d.ts +30 -0
- package/dist/adapters/http/controllers/workflows/admin/module.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/admin/module.mjs +88 -0
- package/dist/adapters/http/controllers/workflows/admin/module.mjs.map +1 -0
- package/dist/adapters/http/controllers/workflows/admin/types.d.ts +14 -0
- package/dist/adapters/http/controllers/workflows/admin/types.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/auth-console.d.ts +16 -0
- package/dist/adapters/http/controllers/workflows/auth-console.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/auth-console.mjs +32 -0
- package/dist/adapters/http/controllers/workflows/auth-console.mjs.map +1 -0
- package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.d.ts +2 -0
- package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.mjs +21 -3
- package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/module.d.ts +16 -1
- package/dist/adapters/http/controllers/workflows/authorize/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/module.mjs +44 -21
- package/dist/adapters/http/controllers/workflows/authorize/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/types.d.ts +5 -0
- package/dist/adapters/http/controllers/workflows/authorize/types.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/console-login/index.d.ts +3 -0
- package/dist/adapters/http/controllers/workflows/console-login/index.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/console-login/index.mjs +5 -0
- package/dist/adapters/http/controllers/workflows/console-login/module.d.ts +83 -0
- package/dist/adapters/http/controllers/workflows/console-login/module.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/console-login/module.mjs +230 -0
- package/dist/adapters/http/controllers/workflows/console-login/module.mjs.map +1 -0
- package/dist/adapters/http/controllers/workflows/console-login/types.d.ts +58 -0
- package/dist/adapters/http/controllers/workflows/console-login/types.d.ts.map +1 -0
- package/dist/adapters/http/controllers/workflows/index.d.ts +2 -0
- package/dist/adapters/http/controllers/workflows/index.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/index.mjs +5 -1
- package/dist/adapters/http/controllers/workflows/logout/module.d.ts +32 -3
- package/dist/adapters/http/controllers/workflows/logout/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/logout/module.mjs +48 -24
- package/dist/adapters/http/controllers/workflows/logout/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/logout/types.d.ts +1 -1
- package/dist/adapters/http/controllers/workflows/logout/types.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts +8 -4
- package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs +7 -9
- package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts +8 -4
- package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.mjs +7 -10
- package/dist/adapters/http/controllers/workflows/password-reset/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/register/module.d.ts +8 -4
- package/dist/adapters/http/controllers/workflows/register/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/register/module.mjs +7 -9
- package/dist/adapters/http/controllers/workflows/register/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/status/module.mjs +1 -1
- package/dist/adapters/http/controllers/workflows/token/module.d.ts +45 -2
- package/dist/adapters/http/controllers/workflows/token/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/token/module.mjs +117 -26
- package/dist/adapters/http/controllers/workflows/token/module.mjs.map +1 -1
- package/dist/adapters/http/cookie/index.d.ts +2 -0
- package/dist/adapters/http/cookie/index.d.ts.map +1 -0
- package/dist/adapters/http/cookie/index.mjs +5 -0
- package/dist/adapters/http/cookie/session.d.ts +35 -0
- package/dist/adapters/http/cookie/session.d.ts.map +1 -0
- package/dist/adapters/http/cookie/session.mjs +62 -0
- package/dist/adapters/http/cookie/session.mjs.map +1 -0
- package/dist/adapters/http/index.d.ts +2 -0
- package/dist/adapters/http/index.d.ts.map +1 -1
- package/dist/adapters/http/index.mjs +20 -16
- package/dist/adapters/http/internal-client/index.d.ts +3 -0
- package/dist/adapters/http/internal-client/index.d.ts.map +1 -0
- package/dist/adapters/http/internal-client/index.mjs +5 -0
- package/dist/adapters/http/internal-client/module.d.ts +21 -0
- package/dist/adapters/http/internal-client/module.d.ts.map +1 -0
- package/dist/adapters/http/{ui/auth-console/http-client.mjs → internal-client/module.mjs} +16 -15
- package/dist/adapters/http/internal-client/module.mjs.map +1 -0
- package/dist/adapters/http/internal-client/types.d.ts +13 -0
- package/dist/adapters/http/internal-client/types.d.ts.map +1 -0
- package/dist/adapters/http/middleware/built-in/authorization/index.d.ts +1 -0
- package/dist/adapters/http/middleware/built-in/authorization/index.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/authorization/index.mjs +2 -1
- package/dist/adapters/http/middleware/built-in/authorization/issuance.d.ts +45 -0
- package/dist/adapters/http/middleware/built-in/authorization/issuance.d.ts.map +1 -0
- package/dist/adapters/http/middleware/built-in/authorization/issuance.mjs +61 -0
- package/dist/adapters/http/middleware/built-in/authorization/issuance.mjs.map +1 -0
- package/dist/adapters/http/middleware/built-in/authorization/module.d.ts +26 -2
- package/dist/adapters/http/middleware/built-in/authorization/module.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/authorization/module.mjs +67 -1
- package/dist/adapters/http/middleware/built-in/authorization/module.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/authorization/types.d.ts +21 -1
- package/dist/adapters/http/middleware/built-in/authorization/types.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/basic.d.ts +2 -2
- package/dist/adapters/http/middleware/built-in/basic.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/basic.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/cors.d.ts +8 -2
- package/dist/adapters/http/middleware/built-in/cors.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/cors.mjs +20 -3
- package/dist/adapters/http/middleware/built-in/cors.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/error.d.ts +2 -2
- package/dist/adapters/http/middleware/built-in/error.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/error.mjs +10 -1
- package/dist/adapters/http/middleware/built-in/error.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/index.d.ts +1 -4
- package/dist/adapters/http/middleware/built-in/index.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/index.mjs +3 -4
- package/dist/adapters/http/middleware/built-in/internal-http-client.d.ts +17 -0
- package/dist/adapters/http/middleware/built-in/internal-http-client.d.ts.map +1 -0
- package/dist/adapters/http/middleware/built-in/internal-http-client.mjs +27 -0
- package/dist/adapters/http/middleware/built-in/internal-http-client.mjs.map +1 -0
- package/dist/adapters/http/middleware/built-in/logger.mjs +1 -1
- package/dist/adapters/http/middleware/built-in/logger.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/prometheus.d.ts +6 -5
- package/dist/adapters/http/middleware/built-in/prometheus.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/prometheus.mjs +3 -2
- package/dist/adapters/http/middleware/built-in/prometheus.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/rate-limit.d.ts +2 -2
- package/dist/adapters/http/middleware/built-in/rate-limit.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/rate-limit.mjs +15 -0
- package/dist/adapters/http/middleware/built-in/rate-limit.mjs.map +1 -1
- package/dist/adapters/http/middleware/index.mjs +3 -4
- package/dist/adapters/http/request/constants.d.ts +1 -1
- package/dist/adapters/http/request/constants.d.ts.map +1 -1
- package/dist/adapters/http/request/constants.mjs +1 -5
- package/dist/adapters/http/request/constants.mjs.map +1 -1
- package/dist/adapters/http/request/helpers/index.d.ts +1 -1
- package/dist/adapters/http/request/helpers/index.d.ts.map +1 -1
- package/dist/adapters/http/request/helpers/index.mjs +2 -2
- package/dist/adapters/http/request/helpers/locale.d.ts +2 -1
- package/dist/adapters/http/request/helpers/locale.d.ts.map +1 -1
- package/dist/adapters/http/request/helpers/locale.mjs +1 -1
- package/dist/adapters/http/request/helpers/locale.mjs.map +1 -1
- package/dist/adapters/http/request/helpers/same-origin.d.ts +38 -0
- package/dist/adapters/http/request/helpers/same-origin.d.ts.map +1 -0
- package/dist/adapters/http/request/helpers/same-origin.mjs +68 -0
- package/dist/adapters/http/request/helpers/same-origin.mjs.map +1 -0
- package/dist/adapters/http/request/index.mjs +2 -2
- package/dist/adapters/http/request/permission/module.mjs +1 -1
- package/dist/adapters/http/request/permission/module.mjs.map +1 -1
- package/dist/adapters/http/request/types.d.ts +1 -2
- package/dist/adapters/http/request/types.d.ts.map +1 -1
- package/dist/adapters/shared/ldap/module.d.ts.map +1 -1
- package/dist/adapters/shared/ldap/module.mjs +4 -1
- package/dist/adapters/shared/ldap/module.mjs.map +1 -1
- package/dist/app/builder.d.ts +4 -4
- package/dist/app/builder.d.ts.map +1 -1
- package/dist/app/builder.mjs +7 -4
- package/dist/app/builder.mjs.map +1 -1
- package/dist/app/factory.d.ts +10 -0
- package/dist/app/factory.d.ts.map +1 -1
- package/dist/app/factory.mjs +26 -2
- package/dist/app/factory.mjs.map +1 -1
- package/dist/app/index.mjs +17 -19
- package/dist/app/modules/authentication/module.d.ts.map +1 -1
- package/dist/app/modules/authentication/module.mjs +15 -2
- package/dist/app/modules/authentication/module.mjs.map +1 -1
- package/dist/app/modules/authentication/repositories/session.d.ts +4 -1
- package/dist/app/modules/authentication/repositories/session.d.ts.map +1 -1
- package/dist/app/modules/authentication/repositories/session.mjs +20 -3
- package/dist/app/modules/authentication/repositories/session.mjs.map +1 -1
- package/dist/app/modules/components/index.d.ts +1 -0
- package/dist/app/modules/components/index.d.ts.map +1 -1
- package/dist/app/modules/components/module.d.ts +3 -1
- package/dist/app/modules/components/module.d.ts.map +1 -1
- package/dist/app/modules/components/module.mjs +26 -7
- package/dist/app/modules/components/module.mjs.map +1 -1
- package/dist/app/modules/components/types.d.ts +11 -0
- package/dist/app/modules/components/types.d.ts.map +1 -0
- package/dist/app/modules/config/app-origins.d.ts +10 -0
- package/dist/app/modules/config/app-origins.d.ts.map +1 -0
- package/dist/app/modules/config/app-origins.mjs +21 -0
- package/dist/app/modules/config/app-origins.mjs.map +1 -0
- package/dist/app/modules/config/constants.d.ts +23 -50
- package/dist/app/modules/config/constants.d.ts.map +1 -1
- package/dist/app/modules/config/constants.mjs +34 -51
- package/dist/app/modules/config/constants.mjs.map +1 -1
- package/dist/app/modules/config/index.d.ts +2 -3
- package/dist/app/modules/config/index.d.ts.map +1 -1
- package/dist/app/modules/config/index.mjs +4 -8
- package/dist/app/modules/config/module.d.ts +2 -2
- package/dist/app/modules/config/module.d.ts.map +1 -1
- package/dist/app/modules/config/module.mjs +1 -1
- package/dist/app/modules/config/module.mjs.map +1 -1
- package/dist/app/modules/config/read.d.ts +29 -0
- package/dist/app/modules/config/read.d.ts.map +1 -0
- package/dist/app/modules/config/read.mjs +65 -0
- package/dist/app/modules/config/read.mjs.map +1 -0
- package/dist/app/modules/config/types.d.ts +30 -397
- package/dist/app/modules/config/types.d.ts.map +1 -1
- package/dist/app/modules/config/validator.d.ts.map +1 -1
- package/dist/app/modules/config/validator.mjs +3 -87
- package/dist/app/modules/config/validator.mjs.map +1 -1
- package/dist/app/modules/database/index.d.ts +1 -0
- package/dist/app/modules/database/index.d.ts.map +1 -1
- package/dist/app/modules/database/index.mjs +2 -1
- package/dist/app/modules/database/migration.d.ts +33 -0
- package/dist/app/modules/database/migration.d.ts.map +1 -0
- package/dist/app/modules/database/migration.mjs +52 -0
- package/dist/app/modules/database/migration.mjs.map +1 -0
- package/dist/app/modules/database/module.d.ts.map +1 -1
- package/dist/app/modules/database/module.mjs +12 -6
- package/dist/app/modules/database/module.mjs.map +1 -1
- package/dist/app/modules/database/repositories/client/repository.d.ts +6 -1
- package/dist/app/modules/database/repositories/client/repository.d.ts.map +1 -1
- package/dist/app/modules/database/repositories/client/repository.mjs +21 -4
- package/dist/app/modules/database/repositories/client/repository.mjs.map +1 -1
- package/dist/app/modules/database/repositories/event/repository.d.ts +29 -2
- package/dist/app/modules/database/repositories/event/repository.d.ts.map +1 -1
- package/dist/app/modules/database/repositories/event/repository.mjs +42 -24
- package/dist/app/modules/database/repositories/event/repository.mjs.map +1 -1
- package/dist/app/modules/database/repositories/helpers.d.ts +24 -1
- package/dist/app/modules/database/repositories/helpers.d.ts.map +1 -1
- package/dist/app/modules/database/repositories/helpers.mjs +38 -1
- package/dist/app/modules/database/repositories/helpers.mjs.map +1 -1
- package/dist/app/modules/database/repositories/identity-provider/repository.d.ts +3 -1
- package/dist/app/modules/database/repositories/identity-provider/repository.d.ts.map +1 -1
- package/dist/app/modules/database/repositories/identity-provider/repository.mjs +3 -3
- package/dist/app/modules/database/repositories/identity-provider/repository.mjs.map +1 -1
- package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs +4 -2
- package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs.map +1 -1
- package/dist/app/modules/database/repositories/key/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/permission/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/policy/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/role/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/scope/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/trust-anchor/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/user/repository.d.ts +7 -2
- package/dist/app/modules/database/repositories/user/repository.d.ts.map +1 -1
- package/dist/app/modules/database/repositories/user/repository.mjs +21 -4
- package/dist/app/modules/database/repositories/user/repository.mjs.map +1 -1
- package/dist/app/modules/http/constants.d.ts +3 -1
- package/dist/app/modules/http/constants.d.ts.map +1 -1
- package/dist/app/modules/http/constants.mjs +3 -2
- package/dist/app/modules/http/constants.mjs.map +1 -1
- package/dist/app/modules/http/module.d.ts +30 -9
- package/dist/app/modules/http/module.d.ts.map +1 -1
- package/dist/app/modules/http/module.mjs +31 -33
- package/dist/app/modules/http/module.mjs.map +1 -1
- package/dist/app/modules/http/modules/controller.d.ts +4 -3
- package/dist/app/modules/http/modules/controller.d.ts.map +1 -1
- package/dist/app/modules/http/modules/controller.mjs +70 -38
- package/dist/app/modules/http/modules/controller.mjs.map +1 -1
- package/dist/app/modules/http/modules/middleware.d.ts +13 -22
- package/dist/app/modules/http/modules/middleware.d.ts.map +1 -1
- package/dist/app/modules/http/modules/middleware.mjs +20 -36
- package/dist/app/modules/http/modules/middleware.mjs.map +1 -1
- package/dist/app/modules/identity/module.mjs +4 -4
- package/dist/app/modules/identity/repositories/client.mjs +4 -2
- package/dist/app/modules/identity/repositories/client.mjs.map +1 -1
- package/dist/app/modules/identity/repositories/user.mjs +4 -2
- package/dist/app/modules/identity/repositories/user.mjs.map +1 -1
- package/dist/app/modules/index.mjs +21 -23
- package/dist/app/modules/logger/module.mjs +1 -1
- package/dist/app/modules/logger/module.mjs.map +1 -1
- package/dist/app/modules/mail/module.d.ts.map +1 -1
- package/dist/app/modules/mail/module.mjs.map +1 -1
- package/dist/app/modules/oauth2/constants.d.ts +3 -1
- package/dist/app/modules/oauth2/constants.d.ts.map +1 -1
- package/dist/app/modules/oauth2/constants.mjs +2 -0
- package/dist/app/modules/oauth2/constants.mjs.map +1 -1
- package/dist/app/modules/oauth2/module.d.ts.map +1 -1
- package/dist/app/modules/oauth2/module.mjs +14 -4
- package/dist/app/modules/oauth2/module.mjs.map +1 -1
- package/dist/app/modules/oauth2/repositories/client/repository.mjs +4 -2
- package/dist/app/modules/oauth2/repositories/client/repository.mjs.map +1 -1
- package/dist/app/modules/oauth2/repositories/consent/repository.d.ts.map +1 -1
- package/dist/app/modules/oauth2/repositories/consent/repository.mjs +3 -2
- package/dist/app/modules/oauth2/repositories/consent/repository.mjs.map +1 -1
- package/dist/app/modules/oauth2/repositories/console-login/index.d.ts +2 -0
- package/dist/app/modules/oauth2/repositories/console-login/index.d.ts.map +1 -0
- package/dist/app/modules/oauth2/repositories/console-login/index.mjs +5 -0
- package/dist/app/modules/oauth2/repositories/console-login/store.d.ts +19 -0
- package/dist/app/modules/oauth2/repositories/console-login/store.d.ts.map +1 -0
- package/dist/app/modules/oauth2/repositories/console-login/store.mjs +47 -0
- package/dist/app/modules/oauth2/repositories/console-login/store.mjs.map +1 -0
- package/dist/app/modules/oauth2/repositories/constants.d.ts +2 -0
- package/dist/app/modules/oauth2/repositories/constants.d.ts.map +1 -1
- package/dist/app/modules/oauth2/repositories/constants.mjs +2 -0
- package/dist/app/modules/oauth2/repositories/constants.mjs.map +1 -1
- package/dist/app/modules/oauth2/repositories/federated-login/index.d.ts +2 -0
- package/dist/app/modules/oauth2/repositories/federated-login/index.d.ts.map +1 -0
- package/dist/app/modules/oauth2/repositories/federated-login/index.mjs +5 -0
- package/dist/app/modules/oauth2/repositories/federated-login/store.d.ts +9 -0
- package/dist/app/modules/oauth2/repositories/federated-login/store.d.ts.map +1 -0
- package/dist/app/modules/oauth2/repositories/federated-login/store.mjs +33 -0
- package/dist/app/modules/oauth2/repositories/federated-login/store.mjs.map +1 -0
- package/dist/app/modules/oauth2/repositories/index.d.ts +2 -0
- package/dist/app/modules/oauth2/repositories/index.d.ts.map +1 -1
- package/dist/app/modules/oauth2/repositories/index.mjs +5 -1
- package/dist/app/modules/oauth2/repositories/session-token/repository.d.ts +2 -2
- package/dist/app/modules/oauth2/repositories/session-token/repository.d.ts.map +1 -1
- package/dist/app/modules/oauth2/repositories/session-token/repository.mjs +5 -3
- package/dist/app/modules/oauth2/repositories/session-token/repository.mjs.map +1 -1
- package/dist/app/modules/provisioning/module.d.ts.map +1 -1
- package/dist/app/modules/provisioning/module.mjs +5 -6
- package/dist/app/modules/provisioning/module.mjs.map +1 -1
- package/dist/app/modules/provisioning/sources/composite/module.d.ts.map +1 -1
- package/dist/app/modules/provisioning/sources/composite/module.mjs +2 -1
- package/dist/app/modules/provisioning/sources/composite/module.mjs.map +1 -1
- package/dist/app/modules/provisioning/sources/default/module.d.ts.map +1 -1
- package/dist/app/modules/provisioning/sources/default/module.mjs +2 -1
- package/dist/app/modules/provisioning/sources/default/module.mjs.map +1 -1
- package/dist/app/modules/runtime/module.d.ts.map +1 -1
- package/dist/app/modules/runtime/module.mjs +2 -1
- package/dist/app/modules/runtime/module.mjs.map +1 -1
- package/dist/app/types.d.ts +16 -0
- package/dist/app/types.d.ts.map +1 -1
- package/dist/cli/commands/config.d.ts +40 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.mjs +65 -0
- package/dist/cli/commands/config.mjs.map +1 -0
- package/dist/cli/commands/healthcheck.d.ts +3 -2
- package/dist/cli/commands/healthcheck.d.ts.map +1 -1
- package/dist/cli/commands/healthcheck.mjs +6 -3
- package/dist/cli/commands/healthcheck.mjs.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.mjs +3 -1
- package/dist/cli/commands/migration.d.ts +3 -10
- package/dist/cli/commands/migration.d.ts.map +1 -1
- package/dist/cli/commands/migration.mjs +17 -9
- package/dist/cli/commands/migration.mjs.map +1 -1
- package/dist/cli/commands/shutdown.d.ts +16 -0
- package/dist/cli/commands/shutdown.d.ts.map +1 -0
- package/dist/cli/commands/shutdown.mjs +41 -0
- package/dist/cli/commands/shutdown.mjs.map +1 -0
- package/dist/cli/commands/start.d.ts +3 -2
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.mjs +3 -21
- package/dist/cli/commands/start.mjs.map +1 -1
- package/dist/cli/commands/types.d.ts.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/module.d.ts +0 -2
- package/dist/cli/module.d.ts.map +1 -1
- package/dist/cli/module.mjs +4 -3
- package/dist/cli/module.mjs.map +1 -1
- package/dist/components/oauth2-cleaner/module.d.ts +2 -2
- package/dist/components/oauth2-cleaner/module.d.ts.map +1 -1
- package/dist/components/oauth2-cleaner/module.mjs +10 -7
- package/dist/components/oauth2-cleaner/module.mjs.map +1 -1
- package/dist/core/authentication/index.mjs +2 -1
- package/dist/core/authentication/session/constants.d.ts +10 -0
- package/dist/core/authentication/session/constants.d.ts.map +1 -0
- package/dist/core/authentication/session/constants.mjs +16 -0
- package/dist/core/authentication/session/constants.mjs.map +1 -0
- package/dist/core/authentication/session/index.d.ts +1 -0
- package/dist/core/authentication/session/index.d.ts.map +1 -1
- package/dist/core/authentication/session/index.mjs +2 -1
- package/dist/core/authentication/session/module.d.ts +2 -1
- package/dist/core/authentication/session/module.d.ts.map +1 -1
- package/dist/core/authentication/session/module.mjs +7 -1
- package/dist/core/authentication/session/module.mjs.map +1 -1
- package/dist/core/authentication/session/types.d.ts +70 -1
- package/dist/core/authentication/session/types.d.ts.map +1 -1
- package/dist/core/authentication/session/types.mjs.map +1 -1
- package/dist/core/entities/client/schema.d.ts.map +1 -1
- package/dist/core/entities/client/schema.mjs +1 -2
- package/dist/core/entities/client/schema.mjs.map +1 -1
- package/dist/core/entities/client/service.d.ts.map +1 -1
- package/dist/core/entities/client/service.mjs +15 -1
- package/dist/core/entities/client/service.mjs.map +1 -1
- package/dist/core/entities/client/system-clients.d.ts +0 -5
- package/dist/core/entities/client/system-clients.d.ts.map +1 -1
- package/dist/core/entities/client/system-clients.mjs +0 -6
- package/dist/core/entities/client/system-clients.mjs.map +1 -1
- package/dist/core/entities/client/types.d.ts +12 -0
- package/dist/core/entities/client/types.d.ts.map +1 -1
- package/dist/core/entities/client-permission/service.mjs +1 -1
- package/dist/core/entities/client-permission/service.mjs.map +1 -1
- package/dist/core/entities/event/constants.d.ts +1 -6
- package/dist/core/entities/event/constants.d.ts.map +1 -1
- package/dist/core/entities/event/constants.mjs +1 -5
- package/dist/core/entities/event/constants.mjs.map +1 -1
- package/dist/core/entities/event/entity-event-handler.d.ts.map +1 -1
- package/dist/core/entities/event/entity-event-handler.mjs +17 -3
- package/dist/core/entities/event/entity-event-handler.mjs.map +1 -1
- package/dist/core/entities/event/service.d.ts.map +1 -1
- package/dist/core/entities/event/service.mjs +3 -3
- package/dist/core/entities/event/service.mjs.map +1 -1
- package/dist/core/entities/event/types.d.ts +15 -1
- package/dist/core/entities/event/types.d.ts.map +1 -1
- package/dist/core/entities/identity-provider/types.d.ts +9 -1
- package/dist/core/entities/identity-provider/types.d.ts.map +1 -1
- package/dist/core/entities/permission/service.mjs +1 -2
- package/dist/core/entities/permission/service.mjs.map +1 -1
- package/dist/core/entities/role-permission/service.mjs +1 -1
- package/dist/core/entities/role-permission/service.mjs.map +1 -1
- package/dist/core/entities/session/service.d.ts +13 -1
- package/dist/core/entities/session/service.d.ts.map +1 -1
- package/dist/core/entities/session/service.mjs +19 -16
- package/dist/core/entities/session/service.mjs.map +1 -1
- package/dist/core/entities/user/schema.d.ts.map +1 -1
- package/dist/core/entities/user/schema.mjs +1 -0
- package/dist/core/entities/user/schema.mjs.map +1 -1
- package/dist/core/entities/user/service.d.ts.map +1 -1
- package/dist/core/entities/user/service.mjs +21 -1
- package/dist/core/entities/user/service.mjs.map +1 -1
- package/dist/core/entities/user/types.d.ts +12 -0
- package/dist/core/entities/user/types.d.ts.map +1 -1
- package/dist/core/entities/user-permission/service.mjs +1 -1
- package/dist/core/entities/user-permission/service.mjs.map +1 -1
- package/dist/core/identity/index.mjs +2 -1
- package/dist/core/identity/permission/junction-grant.mjs +1 -1
- package/dist/core/identity/permission/junction-grant.mjs.map +1 -1
- package/dist/core/identity/provider/account/module.mjs +2 -2
- package/dist/core/identity/provider/account/module.mjs.map +1 -1
- package/dist/core/identity/provider/authentication/index.mjs +2 -1
- package/dist/core/identity/provider/authentication/protocols/index.mjs +2 -1
- package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.d.ts +46 -0
- package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.d.ts.map +1 -0
- package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.mjs +89 -0
- package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.mjs.map +1 -0
- package/dist/core/identity/provider/authentication/protocols/oauth2/index.d.ts +1 -0
- package/dist/core/identity/provider/authentication/protocols/oauth2/index.d.ts.map +1 -1
- package/dist/core/identity/provider/authentication/protocols/oauth2/index.mjs +2 -1
- package/dist/core/identity/provider/authentication/protocols/oauth2/module.d.ts.map +1 -1
- package/dist/core/identity/provider/authentication/protocols/oauth2/module.mjs +9 -2
- package/dist/core/identity/provider/authentication/protocols/oauth2/module.mjs.map +1 -1
- package/dist/core/identity/provider/index.mjs +2 -1
- package/dist/core/identity/registration/service.d.ts.map +1 -1
- package/dist/core/identity/registration/service.mjs +2 -1
- package/dist/core/identity/registration/service.mjs.map +1 -1
- package/dist/core/index.mjs +14 -4
- package/dist/core/oauth2/authorization/helpers.d.ts +14 -0
- package/dist/core/oauth2/authorization/helpers.d.ts.map +1 -1
- package/dist/core/oauth2/authorization/helpers.mjs +15 -2
- package/dist/core/oauth2/authorization/helpers.mjs.map +1 -1
- package/dist/core/oauth2/authorization/index.mjs +2 -2
- package/dist/core/oauth2/authorization/module.d.ts.map +1 -1
- package/dist/core/oauth2/authorization/module.mjs +6 -4
- package/dist/core/oauth2/authorization/module.mjs.map +1 -1
- package/dist/core/oauth2/authorization/state/types.d.ts +8 -0
- package/dist/core/oauth2/authorization/state/types.d.ts.map +1 -1
- package/dist/core/oauth2/backchannel-logout/constants.d.ts +16 -0
- package/dist/core/oauth2/backchannel-logout/constants.d.ts.map +1 -0
- package/dist/core/oauth2/backchannel-logout/constants.mjs +20 -0
- package/dist/core/oauth2/backchannel-logout/constants.mjs.map +1 -0
- package/dist/core/oauth2/backchannel-logout/index.d.ts +4 -0
- package/dist/core/oauth2/backchannel-logout/index.d.ts.map +1 -0
- package/dist/core/oauth2/backchannel-logout/index.mjs +6 -0
- package/dist/core/oauth2/backchannel-logout/module.d.ts +26 -0
- package/dist/core/oauth2/backchannel-logout/module.d.ts.map +1 -0
- package/dist/core/oauth2/backchannel-logout/module.mjs +78 -0
- package/dist/core/oauth2/backchannel-logout/module.mjs.map +1 -0
- package/dist/core/oauth2/backchannel-logout/types.d.ts +29 -0
- package/dist/core/oauth2/backchannel-logout/types.d.ts.map +1 -0
- package/dist/core/oauth2/console-login/constants.d.ts +19 -0
- package/dist/core/oauth2/console-login/constants.d.ts.map +1 -0
- package/dist/core/oauth2/console-login/constants.mjs +24 -0
- package/dist/core/oauth2/console-login/constants.mjs.map +1 -0
- package/dist/core/oauth2/console-login/index.d.ts +3 -0
- package/dist/core/oauth2/console-login/index.d.ts.map +1 -0
- package/dist/core/oauth2/console-login/index.mjs +5 -0
- package/dist/core/oauth2/console-login/types.d.ts +53 -0
- package/dist/core/oauth2/console-login/types.d.ts.map +1 -0
- package/dist/core/oauth2/end-session/service.mjs +1 -1
- package/dist/core/oauth2/end-session/service.mjs.map +1 -1
- package/dist/core/oauth2/federated-login/constants.d.ts +22 -0
- package/dist/core/oauth2/federated-login/constants.d.ts.map +1 -0
- package/dist/core/oauth2/federated-login/constants.mjs +27 -0
- package/dist/core/oauth2/federated-login/constants.mjs.map +1 -0
- package/dist/core/oauth2/federated-login/index.d.ts +1 -0
- package/dist/core/oauth2/federated-login/index.d.ts.map +1 -1
- package/dist/core/oauth2/federated-login/index.mjs +2 -1
- package/dist/core/oauth2/federated-login/module.d.ts +12 -3
- package/dist/core/oauth2/federated-login/module.d.ts.map +1 -1
- package/dist/core/oauth2/federated-login/module.mjs +98 -42
- package/dist/core/oauth2/federated-login/module.mjs.map +1 -1
- package/dist/core/oauth2/federated-login/types.d.ts +82 -24
- package/dist/core/oauth2/federated-login/types.d.ts.map +1 -1
- package/dist/core/oauth2/federated-login/types.mjs +5 -0
- package/dist/core/oauth2/federated-login/types.mjs.map +1 -1
- package/dist/core/oauth2/grant-types/authorize.mjs +1 -1
- package/dist/core/oauth2/grant-types/client-credentials.mjs +1 -1
- package/dist/core/oauth2/grant-types/identity.mjs +1 -1
- package/dist/core/oauth2/grant-types/password.mjs +1 -1
- package/dist/core/oauth2/grant-types/refresh-token.mjs +1 -1
- package/dist/core/oauth2/index.d.ts +4 -0
- package/dist/core/oauth2/index.d.ts.map +1 -1
- package/dist/core/oauth2/index.mjs +15 -4
- package/dist/core/oauth2/introspection/index.d.ts +3 -0
- package/dist/core/oauth2/introspection/index.d.ts.map +1 -0
- package/dist/core/oauth2/introspection/index.mjs +5 -0
- package/dist/core/oauth2/introspection/module.d.ts +14 -0
- package/dist/core/oauth2/introspection/module.d.ts.map +1 -0
- package/dist/core/oauth2/introspection/module.mjs +49 -0
- package/dist/core/oauth2/introspection/module.mjs.map +1 -0
- package/dist/core/oauth2/introspection/types.d.ts +45 -0
- package/dist/core/oauth2/introspection/types.d.ts.map +1 -0
- package/dist/core/oauth2/introspection/types.mjs +4 -0
- package/dist/core/oauth2/openid/claims.d.ts +20 -2
- package/dist/core/oauth2/openid/claims.d.ts.map +1 -1
- package/dist/core/oauth2/openid/claims.mjs +18 -4
- package/dist/core/oauth2/openid/claims.mjs.map +1 -1
- package/dist/core/oauth2/session-credential/constants.d.ts +30 -0
- package/dist/core/oauth2/session-credential/constants.d.ts.map +1 -0
- package/dist/core/oauth2/session-credential/constants.mjs +34 -0
- package/dist/core/oauth2/session-credential/constants.mjs.map +1 -0
- package/dist/core/oauth2/session-credential/index.d.ts +3 -0
- package/dist/core/oauth2/session-credential/index.d.ts.map +1 -0
- package/dist/core/oauth2/session-credential/index.mjs +6 -0
- package/dist/core/oauth2/session-credential/module.d.ts +31 -0
- package/dist/core/oauth2/session-credential/module.d.ts.map +1 -0
- package/dist/core/oauth2/session-credential/module.mjs +43 -0
- package/dist/core/oauth2/session-credential/module.mjs.map +1 -0
- package/dist/core/oauth2/session-token/constants.d.ts +10 -0
- package/dist/core/oauth2/session-token/constants.d.ts.map +1 -0
- package/dist/core/oauth2/session-token/constants.mjs +16 -0
- package/dist/core/oauth2/session-token/constants.mjs.map +1 -0
- package/dist/core/oauth2/session-token/index.d.ts +1 -0
- package/dist/core/oauth2/session-token/index.d.ts.map +1 -1
- package/dist/core/oauth2/session-token/index.mjs +2 -1
- package/dist/core/oauth2/session-token/types.d.ts +13 -2
- package/dist/core/oauth2/session-token/types.d.ts.map +1 -1
- package/dist/core/oauth2/token/verifier/module.d.ts.map +1 -1
- package/dist/core/oauth2/token/verifier/module.mjs +3 -3
- package/dist/core/oauth2/token/verifier/module.mjs.map +1 -1
- package/dist/core/provisioning/merge/module.mjs +5 -3
- package/dist/core/provisioning/merge/module.mjs.map +1 -1
- package/dist/core/query/module.mjs +1 -1
- package/dist/core/query/module.mjs.map +1 -1
- package/dist/core/security/policy/evaluator.mjs +1 -1
- package/dist/core/security/policy/evaluator.mjs.map +1 -1
- package/dist/index.mjs +62 -59
- package/dist/path.mjs +1 -1
- package/dist/swagger.json +573 -163
- package/dist/utils/error.d.ts +6 -0
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/utils/error.mjs +6 -2
- package/dist/utils/error.mjs.map +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +32 -26
- package/dist/adapters/http/middleware/built-in/assets.d.ts +0 -11
- package/dist/adapters/http/middleware/built-in/assets.d.ts.map +0 -1
- package/dist/adapters/http/middleware/built-in/assets.mjs +0 -91
- package/dist/adapters/http/middleware/built-in/assets.mjs.map +0 -1
- package/dist/adapters/http/middleware/built-in/theme.d.ts +0 -15
- package/dist/adapters/http/middleware/built-in/theme.d.ts.map +0 -1
- package/dist/adapters/http/middleware/built-in/theme.mjs +0 -27
- package/dist/adapters/http/middleware/built-in/theme.mjs.map +0 -1
- package/dist/adapters/http/middleware/built-in/types.d.ts +0 -14
- package/dist/adapters/http/middleware/built-in/types.d.ts.map +0 -1
- package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts +0 -15
- package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts.map +0 -1
- package/dist/adapters/http/middleware/built-in/ui-http-client.mjs +0 -25
- package/dist/adapters/http/middleware/built-in/ui-http-client.mjs.map +0 -1
- package/dist/adapters/http/request/helpers/redirect.d.ts +0 -14
- package/dist/adapters/http/request/helpers/redirect.d.ts.map +0 -1
- package/dist/adapters/http/request/helpers/redirect.mjs +0 -36
- package/dist/adapters/http/request/helpers/redirect.mjs.map +0 -1
- package/dist/adapters/http/ui/account-console/index.d.ts +0 -4
- package/dist/adapters/http/ui/account-console/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/account-console/index.mjs +0 -6
- package/dist/adapters/http/ui/account-console/module.d.ts +0 -28
- package/dist/adapters/http/ui/account-console/module.d.ts.map +0 -1
- package/dist/adapters/http/ui/account-console/module.mjs +0 -80
- package/dist/adapters/http/ui/account-console/module.mjs.map +0 -1
- package/dist/adapters/http/ui/account-console/ref.d.ts +0 -30
- package/dist/adapters/http/ui/account-console/ref.d.ts.map +0 -1
- package/dist/adapters/http/ui/account-console/ref.mjs +0 -50
- package/dist/adapters/http/ui/account-console/ref.mjs.map +0 -1
- package/dist/adapters/http/ui/account-console/types.d.ts +0 -11
- package/dist/adapters/http/ui/account-console/types.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/http-client.d.ts +0 -22
- package/dist/adapters/http/ui/auth-console/http-client.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/http-client.mjs.map +0 -1
- package/dist/adapters/http/ui/auth-console/index.d.ts +0 -6
- package/dist/adapters/http/ui/auth-console/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/index.mjs +0 -8
- package/dist/adapters/http/ui/auth-console/module.d.ts +0 -4
- package/dist/adapters/http/ui/auth-console/module.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/module.mjs +0 -73
- package/dist/adapters/http/ui/auth-console/module.mjs.map +0 -1
- package/dist/adapters/http/ui/auth-console/resolve.d.ts +0 -21
- package/dist/adapters/http/ui/auth-console/resolve.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/resolve.mjs +0 -53
- package/dist/adapters/http/ui/auth-console/resolve.mjs.map +0 -1
- package/dist/adapters/http/ui/auth-console/serve.d.ts +0 -9
- package/dist/adapters/http/ui/auth-console/serve.d.ts.map +0 -1
- package/dist/adapters/http/ui/auth-console/serve.mjs +0 -35
- package/dist/adapters/http/ui/auth-console/serve.mjs.map +0 -1
- package/dist/adapters/http/ui/auth-console/types.d.ts +0 -26
- package/dist/adapters/http/ui/auth-console/types.d.ts.map +0 -1
- package/dist/adapters/http/ui/console-packages/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/console-packages/index.mjs +0 -5
- package/dist/adapters/http/ui/console-packages/module.d.ts +0 -33
- package/dist/adapters/http/ui/console-packages/module.d.ts.map +0 -1
- package/dist/adapters/http/ui/console-packages/module.mjs +0 -70
- package/dist/adapters/http/ui/console-packages/module.mjs.map +0 -1
- package/dist/adapters/http/ui/console-packages/types.d.ts +0 -12
- package/dist/adapters/http/ui/console-packages/types.d.ts.map +0 -1
- package/dist/adapters/http/ui/index.d.ts +0 -6
- package/dist/adapters/http/ui/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/index.mjs +0 -25
- package/dist/adapters/http/ui/shared/html.d.ts +0 -76
- package/dist/adapters/http/ui/shared/html.d.ts.map +0 -1
- package/dist/adapters/http/ui/shared/html.mjs +0 -104
- package/dist/adapters/http/ui/shared/html.mjs.map +0 -1
- package/dist/adapters/http/ui/shared/index.d.ts +0 -2
- package/dist/adapters/http/ui/shared/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/shared/index.mjs +0 -5
- package/dist/adapters/http/ui/theme/apply.d.ts +0 -12
- package/dist/adapters/http/ui/theme/apply.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/apply.mjs +0 -29
- package/dist/adapters/http/ui/theme/apply.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/assets.d.ts +0 -20
- package/dist/adapters/http/ui/theme/assets.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/assets.mjs +0 -86
- package/dist/adapters/http/ui/theme/assets.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/constants.d.ts +0 -16
- package/dist/adapters/http/ui/theme/constants.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/constants.mjs +0 -20
- package/dist/adapters/http/ui/theme/constants.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/contract/constants.d.ts +0 -120
- package/dist/adapters/http/ui/theme/contract/constants.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/constants.mjs +0 -136
- package/dist/adapters/http/ui/theme/contract/constants.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/contract/head.d.ts +0 -12
- package/dist/adapters/http/ui/theme/contract/head.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/head.mjs +0 -61
- package/dist/adapters/http/ui/theme/contract/head.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/contract/index.d.ts +0 -6
- package/dist/adapters/http/ui/theme/contract/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/index.mjs +0 -8
- package/dist/adapters/http/ui/theme/contract/manifest.d.ts +0 -25
- package/dist/adapters/http/ui/theme/contract/manifest.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/manifest.mjs +0 -77
- package/dist/adapters/http/ui/theme/contract/manifest.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/contract/types.d.ts +0 -26
- package/dist/adapters/http/ui/theme/contract/types.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/utils.d.ts +0 -11
- package/dist/adapters/http/ui/theme/contract/utils.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/contract/utils.mjs +0 -22
- package/dist/adapters/http/ui/theme/contract/utils.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/index.d.ts +0 -7
- package/dist/adapters/http/ui/theme/index.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/index.mjs +0 -13
- package/dist/adapters/http/ui/theme/module.d.ts +0 -79
- package/dist/adapters/http/ui/theme/module.d.ts.map +0 -1
- package/dist/adapters/http/ui/theme/module.mjs +0 -206
- package/dist/adapters/http/ui/theme/module.mjs.map +0 -1
- package/dist/adapters/http/ui/theme/types.d.ts +0 -42
- package/dist/adapters/http/ui/theme/types.d.ts.map +0 -1
- package/dist/app/modules/config/helpers.d.ts +0 -9
- package/dist/app/modules/config/helpers.d.ts.map +0 -1
- package/dist/app/modules/config/helpers.mjs +0 -22
- package/dist/app/modules/config/helpers.mjs.map +0 -1
- package/dist/app/modules/config/normalize.d.ts +0 -3
- package/dist/app/modules/config/normalize.d.ts.map +0 -1
- package/dist/app/modules/config/normalize.mjs +0 -117
- package/dist/app/modules/config/normalize.mjs.map +0 -1
- package/dist/app/modules/config/origins.d.ts +0 -25
- package/dist/app/modules/config/origins.d.ts.map +0 -1
- package/dist/app/modules/config/origins.mjs +0 -46
- package/dist/app/modules/config/origins.mjs.map +0 -1
- package/dist/app/modules/config/read/env.d.ts +0 -3
- package/dist/app/modules/config/read/env.d.ts.map +0 -1
- package/dist/app/modules/config/read/env.mjs +0 -139
- package/dist/app/modules/config/read/env.mjs.map +0 -1
- package/dist/app/modules/config/read/fs.d.ts +0 -3
- package/dist/app/modules/config/read/fs.d.ts.map +0 -1
- package/dist/app/modules/config/read/fs.mjs +0 -60
- package/dist/app/modules/config/read/fs.mjs.map +0 -1
- package/dist/app/modules/config/read/index.d.ts +0 -5
- package/dist/app/modules/config/read/index.d.ts.map +0 -1
- package/dist/app/modules/config/read/index.mjs +0 -7
- package/dist/app/modules/config/read/module.d.ts +0 -4
- package/dist/app/modules/config/read/module.d.ts.map +0 -1
- package/dist/app/modules/config/read/module.mjs +0 -29
- package/dist/app/modules/config/read/module.mjs.map +0 -1
- package/dist/app/modules/config/read/types.d.ts +0 -9
- package/dist/app/modules/config/read/types.d.ts.map +0 -1
- package/dist/app/modules/config/trust-proxy.d.ts +0 -28
- package/dist/app/modules/config/trust-proxy.d.ts.map +0 -1
- package/dist/app/modules/config/trust-proxy.mjs +0 -64
- package/dist/app/modules/config/trust-proxy.mjs.map +0 -1
- package/dist/cli/config.d.ts +0 -18
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.mjs +0 -34
- package/dist/cli/config.mjs.map +0 -1
- package/dist/cli/types.d.ts.map +0 -1
- package/dist/utils/host.d.ts +0 -2
- package/dist/utils/host.d.ts.map +0 -1
- package/dist/utils/host.mjs +0 -12
- package/dist/utils/host.mjs.map +0 -1
- /package/dist/adapters/http/{middleware/built-in → controllers/workflows/account}/types.mjs +0 -0
- /package/dist/adapters/http/{ui/console-packages → controllers/workflows/admin}/index.d.ts +0 -0
- /package/dist/adapters/http/{ui/account-console → controllers/workflows/admin}/types.mjs +0 -0
- /package/dist/adapters/http/{ui/auth-console → controllers/workflows/console-login}/types.mjs +0 -0
- /package/dist/adapters/http/{ui/console-packages → internal-client}/types.mjs +0 -0
- /package/dist/{adapters/http/ui/theme/contract → app/modules/components}/types.mjs +0 -0
- /package/dist/cli/{types.d.ts → commands/types.d.ts} +0 -0
- /package/dist/{adapters/http/ui/theme → cli/commands}/types.mjs +0 -0
- /package/dist/{app/modules/config/read → core/oauth2/backchannel-logout}/types.mjs +0 -0
- /package/dist/{cli → core/oauth2/console-login}/types.mjs +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IAppEvent } from 'routup';
|
|
2
|
+
/**
|
|
3
|
+
* The console session cookie's flags live here, in ONE place, because every
|
|
4
|
+
* one of them is load-bearing and two copies would drift:
|
|
5
|
+
*
|
|
6
|
+
* - `httpOnly` is the whole point of plan 088 (a token in JavaScript is what
|
|
7
|
+
* this replaces);
|
|
8
|
+
* - `sameSite: 'strict'` is the first of the three conditions the gate rests
|
|
9
|
+
* on, so the credential never rides a cross-site request;
|
|
10
|
+
* - `path` is the deployment's base path, never a hard-coded `/`, which under
|
|
11
|
+
* a sub-path deployment would hand the cookie to every app co-hosted on the
|
|
12
|
+
* host.
|
|
13
|
+
*
|
|
14
|
+
* Both writers go through here: the callback that mints the credential, and
|
|
15
|
+
* the authorization middleware, which re-arms the expiry (see below).
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildSessionCookiePath(baseURL: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Write the console session cookie.
|
|
20
|
+
*
|
|
21
|
+
* `ttl` is the session's REMAINING lifetime in milliseconds; `Max-Age` is
|
|
22
|
+
* seconds, so it is divided. Taken literally the millisecond value would emit
|
|
23
|
+
* a cookie outliving its session by three orders of magnitude.
|
|
24
|
+
*
|
|
25
|
+
* This is called on every slide, not only at login. The session's `expiresAt`
|
|
26
|
+
* moves forward as the user works, but a cookie's `Max-Age` is fixed by the
|
|
27
|
+
* response that set it: without re-arming, the browser would discard the
|
|
28
|
+
* credential at login + one lifetime and sign an ACTIVE user out mid-task,
|
|
29
|
+
* which is precisely the hard cap the sliding-expiry decision rejected. The
|
|
30
|
+
* server-side slide would still be happening and would simply never be
|
|
31
|
+
* observable.
|
|
32
|
+
*/
|
|
33
|
+
export declare function setSessionCookie(event: IAppEvent, baseURL: string, value: string, ttl: number): void;
|
|
34
|
+
export declare function unsetSessionCookie(event: IAppEvent, baseURL: string): void;
|
|
35
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/adapters/http/cookie/session.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAI,MAAM,CAE/D;AAUD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC5B,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACX,IAAI,CAQP;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAE3E"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { SESSION_COOKIE } from "../../../core/oauth2/session-credential/constants.mjs";
|
|
5
|
+
import "../../../core/index.mjs";
|
|
6
|
+
import { getURLBasePath } from "@authup/kit";
|
|
7
|
+
import { setResponseCookie, unsetResponseCookie } from "@routup/basic/cookie";
|
|
8
|
+
//#region src/adapters/http/cookie/session.ts
|
|
9
|
+
/**
|
|
10
|
+
* The console session cookie's flags live here, in ONE place, because every
|
|
11
|
+
* one of them is load-bearing and two copies would drift:
|
|
12
|
+
*
|
|
13
|
+
* - `httpOnly` is the whole point of plan 088 (a token in JavaScript is what
|
|
14
|
+
* this replaces);
|
|
15
|
+
* - `sameSite: 'strict'` is the first of the three conditions the gate rests
|
|
16
|
+
* on, so the credential never rides a cross-site request;
|
|
17
|
+
* - `path` is the deployment's base path, never a hard-coded `/`, which under
|
|
18
|
+
* a sub-path deployment would hand the cookie to every app co-hosted on the
|
|
19
|
+
* host.
|
|
20
|
+
*
|
|
21
|
+
* Both writers go through here: the callback that mints the credential, and
|
|
22
|
+
* the authorization middleware, which re-arms the expiry (see below).
|
|
23
|
+
*/ function buildSessionCookiePath(baseURL) {
|
|
24
|
+
return getURLBasePath(baseURL) || "/";
|
|
25
|
+
}
|
|
26
|
+
function isSecureBaseURL(baseURL) {
|
|
27
|
+
try {
|
|
28
|
+
return new URL(baseURL).protocol === "https:";
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Write the console session cookie.
|
|
35
|
+
*
|
|
36
|
+
* `ttl` is the session's REMAINING lifetime in milliseconds; `Max-Age` is
|
|
37
|
+
* seconds, so it is divided. Taken literally the millisecond value would emit
|
|
38
|
+
* a cookie outliving its session by three orders of magnitude.
|
|
39
|
+
*
|
|
40
|
+
* This is called on every slide, not only at login. The session's `expiresAt`
|
|
41
|
+
* moves forward as the user works, but a cookie's `Max-Age` is fixed by the
|
|
42
|
+
* response that set it: without re-arming, the browser would discard the
|
|
43
|
+
* credential at login + one lifetime and sign an ACTIVE user out mid-task,
|
|
44
|
+
* which is precisely the hard cap the sliding-expiry decision rejected. The
|
|
45
|
+
* server-side slide would still be happening and would simply never be
|
|
46
|
+
* observable.
|
|
47
|
+
*/ function setSessionCookie(event, baseURL, value, ttl) {
|
|
48
|
+
setResponseCookie(event, SESSION_COOKIE, value, {
|
|
49
|
+
httpOnly: true,
|
|
50
|
+
sameSite: "strict",
|
|
51
|
+
secure: isSecureBaseURL(baseURL),
|
|
52
|
+
path: buildSessionCookiePath(baseURL),
|
|
53
|
+
maxAge: Math.floor(ttl / 1e3)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function unsetSessionCookie(event, baseURL) {
|
|
57
|
+
unsetResponseCookie(event, SESSION_COOKIE, { path: buildSessionCookiePath(baseURL) });
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { buildSessionCookiePath, setSessionCookie, unsetSessionCookie };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=session.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.mjs","names":["getURLBasePath","setResponseCookie","unsetResponseCookie","SESSION_COOKIE","buildSessionCookiePath","baseURL","isSecureBaseURL","URL","protocol","setSessionCookie","event","value","ttl","httpOnly","sameSite","secure","path","maxAge","Math","floor","unsetSessionCookie"],"sources":["../../../../src/adapters/http/cookie/session.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { getURLBasePath } from '@authup/kit';\nimport { setResponseCookie, unsetResponseCookie } from '@routup/basic/cookie';\nimport type { IAppEvent } from 'routup';\nimport { SESSION_COOKIE } from '../../../core/index.ts';\n\n/**\n * The console session cookie's flags live here, in ONE place, because every\n * one of them is load-bearing and two copies would drift:\n *\n * - `httpOnly` is the whole point of plan 088 (a token in JavaScript is what\n * this replaces);\n * - `sameSite: 'strict'` is the first of the three conditions the gate rests\n * on, so the credential never rides a cross-site request;\n * - `path` is the deployment's base path, never a hard-coded `/`, which under\n * a sub-path deployment would hand the cookie to every app co-hosted on the\n * host.\n *\n * Both writers go through here: the callback that mints the credential, and\n * the authorization middleware, which re-arms the expiry (see below).\n */\nexport function buildSessionCookiePath(baseURL: string) : string {\n return getURLBasePath(baseURL) || '/';\n}\n\nfunction isSecureBaseURL(baseURL: string) : boolean {\n try {\n return new URL(baseURL).protocol === 'https:';\n } catch {\n return false;\n }\n}\n\n/**\n * Write the console session cookie.\n *\n * `ttl` is the session's REMAINING lifetime in milliseconds; `Max-Age` is\n * seconds, so it is divided. Taken literally the millisecond value would emit\n * a cookie outliving its session by three orders of magnitude.\n *\n * This is called on every slide, not only at login. The session's `expiresAt`\n * moves forward as the user works, but a cookie's `Max-Age` is fixed by the\n * response that set it: without re-arming, the browser would discard the\n * credential at login + one lifetime and sign an ACTIVE user out mid-task,\n * which is precisely the hard cap the sliding-expiry decision rejected. The\n * server-side slide would still be happening and would simply never be\n * observable.\n */\nexport function setSessionCookie(\n event: IAppEvent,\n baseURL: string,\n value: string,\n ttl: number,\n) : void {\n setResponseCookie(event, SESSION_COOKIE, value, {\n httpOnly: true,\n sameSite: 'strict',\n secure: isSecureBaseURL(baseURL),\n path: buildSessionCookiePath(baseURL),\n maxAge: Math.floor(ttl / 1000),\n });\n}\n\nexport function unsetSessionCookie(event: IAppEvent, baseURL: string) : void {\n unsetResponseCookie(event, SESSION_COOKIE, { path: buildSessionCookiePath(baseURL) });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GA2BA,SAAgBI,uBAAuBC,SAAe;CAClD,OAAOL,eAAeK,OAAAA,KAAY;AACtC;AAEA,SAASC,gBAAgBD,SAAe;CACpC,IAAI;EACA,OAAO,IAAIE,IAAIF,OAAAA,CAAAA,CAASG,aAAa;CACzC,QAAQ;EACJ,OAAO;CACX;AACJ;;;;;;;;;;;;;;;GAiBA,SAAgBC,iBACZC,OACAL,SACAM,OACAC,KAAW;CAEXX,kBAAkBS,OAAOP,gBAAgBQ,OAAO;EAC5CE,UAAU;EACVC,UAAU;EACVC,QAAQT,gBAAgBD,OAAAA;EACxBW,MAAMZ,uBAAuBC,OAAAA;EAC7BY,QAAQC,KAAKC,MAAMP,MAAM,GAAA;CAC7B,CAAA;AACJ;AAEA,SAAgBQ,mBAAmBV,OAAkBL,SAAe;CAChEH,oBAAoBQ,OAAOP,gBAAgB,EAAEa,MAAMZ,uBAAuBC,OAAAA,EAAS,CAAA;AACvF"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './adapters/index.ts';
|
|
2
|
+
export * from './constants.ts';
|
|
2
3
|
export * from './controllers/index.ts';
|
|
4
|
+
export * from './internal-client/index.ts';
|
|
3
5
|
export * from './middleware/index.ts';
|
|
4
6
|
export * from './request/index.ts';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/http/index.ts"],"names":[],"mappings":"AAOA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/http/index.ts"],"names":[],"mappings":"AAOA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
@@ -12,21 +12,34 @@ import { readFromLocations } from "./request/helpers/locations.mjs";
|
|
|
12
12
|
import { setRequestMfaLoginTicket, useRequestMfaLoginTicket } from "./request/helpers/mfa-login-ticket.mjs";
|
|
13
13
|
import { getRequestParamID, getRequestStringParam, getRequestStringParamOrFail, useRequestParamID } from "./request/helpers/param-id.mjs";
|
|
14
14
|
import { applyRouteRealmIDToBody, getRequestRealmID, setRequestRealmID } from "./request/helpers/realm-id.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { isSameOriginRequest } from "./request/helpers/same-origin.mjs";
|
|
16
16
|
import { setRequestScopes, useRequestScopes } from "./request/helpers/scopes.mjs";
|
|
17
17
|
import { setRequestSessionId, useRequestSessionId } from "./request/helpers/session-id.mjs";
|
|
18
18
|
import { setRequestToken, useRequestToken } from "./request/helpers/token.mjs";
|
|
19
19
|
import { createRequestEventContextMiddleware, runWithRequestEventContext, useRequestEventContext } from "./request/event-context.mjs";
|
|
20
20
|
import { RequestPermissionEvaluator } from "./request/permission/module.mjs";
|
|
21
21
|
import "./request/index.mjs";
|
|
22
|
+
import { createInternalHttpClient, createPublicToInternalURLRewriter } from "./internal-client/module.mjs";
|
|
23
|
+
import "./internal-client/index.mjs";
|
|
24
|
+
import { HTTPOAuth2Authorizer } from "./adapters/oauth2/authorization/module.mjs";
|
|
25
|
+
import { extractOAuth2ClientCertificateEvidence } from "./adapters/oauth2/grant-types/utils/certificate.mjs";
|
|
26
|
+
import { extractClientCredentialsFromRequest, readStringField } from "./adapters/oauth2/grant-types/utils/credentials.mjs";
|
|
27
|
+
import { guessOauth2GrantTypeByRequest } from "./adapters/oauth2/grant-types/utils/guess.mjs";
|
|
28
|
+
import { readRealmHint } from "./adapters/oauth2/grant-types/utils/realm.mjs";
|
|
29
|
+
import { HTTPOAuth2AuthorizeGrant } from "./adapters/oauth2/grant-types/authorize.mjs";
|
|
30
|
+
import { HTTPClientCredentialsGrant } from "./adapters/oauth2/grant-types/client-credentials.mjs";
|
|
31
|
+
import { HTTPOAuth2IdentityGrantType } from "./adapters/oauth2/grant-types/identity.mjs";
|
|
32
|
+
import { HTTPPasswordGrant } from "./adapters/oauth2/grant-types/password.mjs";
|
|
33
|
+
import { HTTPOAuth2RefreshTokenGrant } from "./adapters/oauth2/grant-types/refresh_token.mjs";
|
|
34
|
+
import "./adapters/index.mjs";
|
|
35
|
+
import { ACCOUNT_CONSOLE_SEGMENT, ADMIN_CONSOLE_SEGMENT, AUTH_CONSOLE_SEGMENT } from "./constants.mjs";
|
|
36
|
+
import { OAUTH2_ISSUANCE_PATHS, isOAuth2IssuancePath, normalizeRequestPath } from "./middleware/built-in/authorization/issuance.mjs";
|
|
22
37
|
import { AuthorizationMiddleware } from "./middleware/built-in/authorization/module.mjs";
|
|
23
38
|
import { createAuthorizationMiddleware } from "./middleware/built-in/authorization/factory.mjs";
|
|
24
39
|
import { ForceLoggedInMiddleware } from "./middleware/built-in/loggedin/module.mjs";
|
|
25
40
|
import { ForceUserLoggedInMiddleware } from "./middleware/built-in/loggedin/user.mjs";
|
|
26
41
|
import { RealmResolverMiddleware } from "./middleware/built-in/realm-resolver/module.mjs";
|
|
27
42
|
import { createRealmResolverMiddleware } from "./middleware/built-in/realm-resolver/factory.mjs";
|
|
28
|
-
import { THEME_STORE_KEY, registerThemeMiddleware, useRequestTheme } from "./middleware/built-in/theme.mjs";
|
|
29
|
-
import { VITE_SERVER_STORE_KEY, registerAssetsMiddleware } from "./middleware/built-in/assets.mjs";
|
|
30
43
|
import { registerBasicMiddleware } from "./middleware/built-in/basic.mjs";
|
|
31
44
|
import { registerCorsMiddleware } from "./middleware/built-in/cors.mjs";
|
|
32
45
|
import { registerErrorMiddleware } from "./middleware/built-in/error.mjs";
|
|
@@ -34,19 +47,8 @@ import { createLoggerMiddleware, redactSensitiveURLParams } from "./middleware/b
|
|
|
34
47
|
import { createRouteTemplateNormalizePath, registerPrometheusMiddleware } from "./middleware/built-in/prometheus.mjs";
|
|
35
48
|
import { registerRateLimitMiddleware } from "./middleware/built-in/rate-limit.mjs";
|
|
36
49
|
import { createSwaggerMiddleware } from "./middleware/built-in/swagger.mjs";
|
|
37
|
-
import {
|
|
50
|
+
import { INTERNAL_HTTP_CLIENT_FACTORY_STORE_KEY, registerInternalHttpClientMiddleware } from "./middleware/built-in/internal-http-client.mjs";
|
|
38
51
|
import "./middleware/index.mjs";
|
|
39
|
-
import { HTTPOAuth2Authorizer } from "./adapters/oauth2/authorization/module.mjs";
|
|
40
|
-
import { extractOAuth2ClientCertificateEvidence } from "./adapters/oauth2/grant-types/utils/certificate.mjs";
|
|
41
|
-
import { extractClientCredentialsFromRequest, readStringField } from "./adapters/oauth2/grant-types/utils/credentials.mjs";
|
|
42
|
-
import { guessOauth2GrantTypeByRequest } from "./adapters/oauth2/grant-types/utils/guess.mjs";
|
|
43
|
-
import { readRealmHint } from "./adapters/oauth2/grant-types/utils/realm.mjs";
|
|
44
|
-
import { HTTPOAuth2AuthorizeGrant } from "./adapters/oauth2/grant-types/authorize.mjs";
|
|
45
|
-
import { HTTPClientCredentialsGrant } from "./adapters/oauth2/grant-types/client-credentials.mjs";
|
|
46
|
-
import { HTTPOAuth2IdentityGrantType } from "./adapters/oauth2/grant-types/identity.mjs";
|
|
47
|
-
import { HTTPPasswordGrant } from "./adapters/oauth2/grant-types/password.mjs";
|
|
48
|
-
import { HTTPOAuth2RefreshTokenGrant } from "./adapters/oauth2/grant-types/refresh_token.mjs";
|
|
49
|
-
import "./adapters/index.mjs";
|
|
50
52
|
import { ClientController } from "./controllers/entities/client/module.mjs";
|
|
51
53
|
import { ClientPermissionController } from "./controllers/entities/client-permission/module.mjs";
|
|
52
54
|
import { ClientPermissionRequestValidator } from "./controllers/entities/client-permission/utils/validation.mjs";
|
|
@@ -62,8 +64,10 @@ import { IdentityProviderRoleMappingController } from "./controllers/entities/id
|
|
|
62
64
|
import { KeyController } from "./controllers/entities/key/module.mjs";
|
|
63
65
|
import { PermissionController } from "./controllers/entities/permission/module.mjs";
|
|
64
66
|
import { PermissionPolicyController } from "./controllers/entities/permission-policy/module.mjs";
|
|
67
|
+
import { ConsoleLogin } from "./controllers/workflows/console-login/module.mjs";
|
|
65
68
|
import { AccountController } from "./controllers/workflows/account/module.mjs";
|
|
66
69
|
import { ActivateController } from "./controllers/workflows/activate/module.mjs";
|
|
70
|
+
import { AdminController } from "./controllers/workflows/admin/module.mjs";
|
|
67
71
|
import { AuthenticatorChallengeController } from "./controllers/workflows/authenticator-challenge/module.mjs";
|
|
68
72
|
import { AuthorizeController } from "./controllers/workflows/authorize/module.mjs";
|
|
69
73
|
import { getJwkRouteHandler, getJwksRouteHandler } from "./controllers/workflows/jwks/handlers/read.mjs";
|
|
@@ -98,4 +102,4 @@ import { UserPermissionRequestValidator } from "./controllers/entities/user-perm
|
|
|
98
102
|
import { UserRoleController } from "./controllers/entities/user-role/module.mjs";
|
|
99
103
|
import { UserRoleRequestValidator } from "./controllers/entities/user-role/utils/validation.mjs";
|
|
100
104
|
import "./controllers/index.mjs";
|
|
101
|
-
export { AccountController, ActivateController, AuthenticatorChallengeController, AuthorizationMiddleware, AuthorizeController, CERTIFICATE_SOURCES, ClientController, ClientPermissionController, ClientPermissionRequestValidator, ClientRoleController, ClientRoleRequestValidator, ClientScopeController, ClientScopeRequestValidator, ConsentController, EventController, ForceLoggedInMiddleware, ForceUserLoggedInMiddleware, HTTPClientCredentialsGrant, HTTPOAuth2AuthorizeGrant, HTTPOAuth2Authorizer, HTTPOAuth2IdentityGrantType, HTTPOAuth2RefreshTokenGrant, HTTPPasswordGrant, IdentityProviderAccountController, IdentityProviderController, IdentityProviderRoleMappingController, JwkController, KeyController, LOCALE_COOKIE, LogoutController, OpenIDController, PasswordForgotController, PasswordResetController, PermissionController, PermissionPolicyController, PolicyAttributesValidator, PolicyController, PolicyValidator, RealmController, RealmResolverMiddleware, RegisterController, RequestHandlerOperation, RequestIdentity, RequestPermissionEvaluator, RoleAttributeController, RoleAttributeRequestValidator, RoleController, RolePermissionController, RolePermissionRequestValidator, ScopeController, SessionController, SessionTokenController, StatusController,
|
|
105
|
+
export { ACCOUNT_CONSOLE_SEGMENT, ADMIN_CONSOLE_SEGMENT, AUTH_CONSOLE_SEGMENT, AccountController, ActivateController, AdminController, AuthenticatorChallengeController, AuthorizationMiddleware, AuthorizeController, CERTIFICATE_SOURCES, ClientController, ClientPermissionController, ClientPermissionRequestValidator, ClientRoleController, ClientRoleRequestValidator, ClientScopeController, ClientScopeRequestValidator, ConsentController, ConsoleLogin, EventController, ForceLoggedInMiddleware, ForceUserLoggedInMiddleware, HTTPClientCredentialsGrant, HTTPOAuth2AuthorizeGrant, HTTPOAuth2Authorizer, HTTPOAuth2IdentityGrantType, HTTPOAuth2RefreshTokenGrant, HTTPPasswordGrant, INTERNAL_HTTP_CLIENT_FACTORY_STORE_KEY, IdentityProviderAccountController, IdentityProviderController, IdentityProviderRoleMappingController, JwkController, KeyController, LOCALE_COOKIE, LogoutController, OAUTH2_ISSUANCE_PATHS, OpenIDController, PasswordForgotController, PasswordResetController, PermissionController, PermissionPolicyController, PolicyAttributesValidator, PolicyController, PolicyValidator, RealmController, RealmResolverMiddleware, RegisterController, RequestHandlerOperation, RequestIdentity, RequestPermissionEvaluator, RoleAttributeController, RoleAttributeRequestValidator, RoleController, RolePermissionController, RolePermissionRequestValidator, ScopeController, SessionController, SessionTokenController, StatusController, TokenController, TrustAnchorController, UserAttributeController, UserAttributeRequestValidator, UserAuthenticatorController, UserController, UserInfoController, UserPermissionController, UserPermissionRequestValidator, UserRoleController, UserRoleRequestValidator, applyRouteRealmIDToBody, buildActorContext, createAuthorizationMiddleware, createInternalHttpClient, createLoggerMiddleware, createPublicToInternalURLRewriter, createRealmResolverMiddleware, createRequestEventContextMiddleware, createRouteTemplateNormalizePath, createSwaggerMiddleware, extractClientCertificateEvidence, extractClientCredentialsFromRequest, extractOAuth2ClientCertificateEvidence, getBodyRealmID, getJwkRouteHandler, getJwksRouteHandler, getRequestParamID, getRequestRealmID, getRequestStringParam, getRequestStringParamOrFail, guessOauth2GrantTypeByRequest, isOAuth2IssuancePath, isSameOriginRequest, normalizeRequestPath, readFromLocations, readRealmHint, readStringField, redactSensitiveURLParams, registerBasicMiddleware, registerCorsMiddleware, registerErrorMiddleware, registerInternalHttpClientMiddleware, registerPrometheusMiddleware, registerRateLimitMiddleware, runWithRequestEventContext, setRequestIdentity, setRequestMfaLoginTicket, setRequestPermissionEvaluator, setRequestRealmID, setRequestScopes, setRequestSessionId, setRequestToken, useRequestEventContext, useRequestIdentity, useRequestIdentityOrFail, useRequestLocale, useRequestMfaLoginTicket, useRequestParamID, useRequestPermissionEvaluator, useRequestScopes, useRequestSessionId, useRequestToken };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/http/internal-client/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IClient } from '@authup/core-http-kit';
|
|
2
|
+
import type { InternalHttpClientContext } from './types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Build a rewriter that maps URLs under the public base URL
|
|
5
|
+
* (scheme://host[/prefix]) onto the server's own listen address. URLs
|
|
6
|
+
* outside the public origin/prefix pass through untouched.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createPublicToInternalURLRewriter(publicURL: string, internalURL: string): (url: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* HTTP client for this server's calls to its own API: they are dispatched
|
|
11
|
+
* against its own listen address, so there is no reverse-proxy round-trip,
|
|
12
|
+
* no TLS (a self-signed publicUrl certificate would otherwise fail Node's
|
|
13
|
+
* fetch) and no dependency on the public hostname resolving from inside the
|
|
14
|
+
* deployment. Its one consumer is the console login's token exchange.
|
|
15
|
+
*
|
|
16
|
+
* The rewrite happens at the TRANSPORT layer only: `baseURL` must stay the
|
|
17
|
+
* public URL because the values derived from it are user-facing, and a
|
|
18
|
+
* `redirect_uri` in particular is compared byte for byte at redemption.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createInternalHttpClient(ctx: InternalHttpClientContext): IClient;
|
|
21
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/adapters/http/internal-client/module.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC7C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GACnB,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAmC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,yBAAyB,GAAI,OAAO,CAOjF"}
|
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { FetchTransport, fetch } from "hapic";
|
|
5
5
|
import { Client } from "@authup/core-http-kit";
|
|
6
|
-
//#region src/adapters/http/
|
|
6
|
+
//#region src/adapters/http/internal-client/module.ts
|
|
7
7
|
/**
|
|
8
8
|
* Build a rewriter that maps URLs under the public base URL
|
|
9
9
|
* (scheme://host[/prefix]) onto the server's own listen address. URLs
|
|
@@ -22,24 +22,25 @@ import { Client } from "@authup/core-http-kit";
|
|
|
22
22
|
}
|
|
23
23
|
if (parsed.origin !== publicParsed.origin) return url;
|
|
24
24
|
let { pathname } = parsed;
|
|
25
|
-
if (basePath)
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (basePath) {
|
|
26
|
+
if (pathname === basePath) pathname = "/";
|
|
27
|
+
else if (pathname.startsWith(`${basePath}/`)) pathname = pathname.substring(basePath.length);
|
|
28
|
+
else return url;
|
|
29
|
+
}
|
|
28
30
|
return new URL(pathname + parsed.search, internalParsed.origin).href;
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
|
-
* HTTP client for
|
|
33
|
-
*
|
|
34
|
-
* no
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* HTTP client for this server's calls to its own API: they are dispatched
|
|
35
|
+
* against its own listen address, so there is no reverse-proxy round-trip,
|
|
36
|
+
* no TLS (a self-signed publicUrl certificate would otherwise fail Node's
|
|
37
|
+
* fetch) and no dependency on the public hostname resolving from inside the
|
|
38
|
+
* deployment. Its one consumer is the console login's token exchange.
|
|
37
39
|
*
|
|
38
40
|
* The rewrite happens at the TRANSPORT layer only: `baseURL` must stay the
|
|
39
|
-
* public URL because the
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
*/ function createInternalUIHttpClient(ctx) {
|
|
41
|
+
* public URL because the values derived from it are user-facing, and a
|
|
42
|
+
* `redirect_uri` in particular is compared byte for byte at redemption.
|
|
43
|
+
*/ function createInternalHttpClient(ctx) {
|
|
43
44
|
const rewriteURL = createPublicToInternalURLRewriter(ctx.publicURL, ctx.internalURL);
|
|
44
45
|
return new Client({
|
|
45
46
|
baseURL: ctx.publicURL,
|
|
@@ -47,6 +48,6 @@ import { Client } from "@authup/core-http-kit";
|
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
//#endregion
|
|
50
|
-
export {
|
|
51
|
+
export { createInternalHttpClient, createPublicToInternalURLRewriter };
|
|
51
52
|
|
|
52
|
-
//# sourceMappingURL=
|
|
53
|
+
//# sourceMappingURL=module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.mjs","names":["Client","FetchTransport","fetch","createPublicToInternalURLRewriter","publicURL","internalURL","publicParsed","URL","internalParsed","hostname","basePath","pathname","replace","url","parsed","origin","startsWith","substring","length","search","href","createInternalHttpClient","ctx","rewriteURL","baseURL","transport","input","init"],"sources":["../../../../src/adapters/http/internal-client/module.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { Client } from '@authup/core-http-kit';\nimport type { IClient } from '@authup/core-http-kit';\nimport { FetchTransport, fetch } from 'hapic';\nimport type { InternalHttpClientContext } from './types.ts';\n\n/**\n * Build a rewriter that maps URLs under the public base URL\n * (scheme://host[/prefix]) onto the server's own listen address. URLs\n * outside the public origin/prefix pass through untouched.\n */\nexport function createPublicToInternalURLRewriter(\n publicURL: string,\n internalURL: string,\n) : (url: string) => string {\n const publicParsed = new URL(publicURL);\n const internalParsed = new URL(internalURL);\n // a wildcard listen address (0.0.0.0 / [::]) is not reliably dialable —\n // loop back explicitly\n if (internalParsed.hostname === '0.0.0.0' || internalParsed.hostname === '[::]') {\n internalParsed.hostname = '127.0.0.1';\n }\n const basePath = publicParsed.pathname.replace(/\\/+$/, '');\n\n return (url: string) => {\n let parsed : URL;\n try {\n parsed = new URL(url);\n } catch {\n return url;\n }\n\n if (parsed.origin !== publicParsed.origin) {\n return url;\n }\n\n let { pathname } = parsed;\n if (basePath) {\n if (pathname === basePath) {\n pathname = '/';\n } else if (pathname.startsWith(`${basePath}/`)) {\n pathname = pathname.substring(basePath.length);\n } else {\n return url;\n }\n }\n\n return new URL(pathname + parsed.search, internalParsed.origin).href;\n };\n}\n\n/**\n * HTTP client for this server's calls to its own API: they are dispatched\n * against its own listen address, so there is no reverse-proxy round-trip,\n * no TLS (a self-signed publicUrl certificate would otherwise fail Node's\n * fetch) and no dependency on the public hostname resolving from inside the\n * deployment. Its one consumer is the console login's token exchange.\n *\n * The rewrite happens at the TRANSPORT layer only: `baseURL` must stay the\n * public URL because the values derived from it are user-facing, and a\n * `redirect_uri` in particular is compared byte for byte at redemption.\n */\nexport function createInternalHttpClient(ctx: InternalHttpClientContext) : IClient {\n const rewriteURL = createPublicToInternalURLRewriter(ctx.publicURL, ctx.internalURL);\n\n return new Client({\n baseURL: ctx.publicURL,\n transport: new FetchTransport({ fetch: (input, init) => fetch(rewriteURL(input), init) }),\n });\n}\n"],"mappings":";;;;;;;;;;GAiBA,SAAgBG,kCACZC,WACAC,aAAmB;CAEnB,MAAMC,eAAe,IAAIC,IAAIH,SAAAA;CAC7B,MAAMI,iBAAiB,IAAID,IAAIF,WAAAA;CAG/B,IAAIG,eAAeC,aAAa,aAAaD,eAAeC,aAAa,QACrED,eAAeC,WAAW;CAE9B,MAAMC,WAAWJ,aAAaK,SAASC,QAAQ,QAAQ,EAAA;CAEvD,QAAQC,QAAAA;EACJ,IAAIC;EACJ,IAAI;GACAA,SAAS,IAAIP,IAAIM,GAAAA;EACrB,QAAQ;GACJ,OAAOA;EACX;EAEA,IAAIC,OAAOC,WAAWT,aAAaS,QAC/B,OAAOF;EAGX,IAAI,EAAEF,aAAaG;EACnB,IAAIJ,UAAU;GACV,IAAIC,aAAaD,UACbC,WAAW;QACR,IAAIA,SAASK,WAAW,GAAGN,SAAS,EAAE,GACzCC,WAAWA,SAASM,UAAUP,SAASQ,MAAM;QAE7C,OAAOL;EAEf;EAEA,OAAO,IAAIN,IAAII,WAAWG,OAAOK,QAAQX,eAAeO,MAAM,CAAA,CAAEK;CACpE;AACJ;;;;;;;;;;;GAaA,SAAgBC,yBAAyBC,KAA8B;CACnE,MAAMC,aAAapB,kCAAkCmB,IAAIlB,WAAWkB,IAAIjB,WAAW;CAEnF,OAAO,IAAIL,OAAO;EACdwB,SAASF,IAAIlB;EACbqB,WAAW,IAAIxB,eAAe,EAAEC,QAAQwB,OAAOC,SAASzB,MAAMqB,WAAWG,KAAAA,GAAQC,IAAAA,EAAM,CAAA;CAC3F,CAAA;AACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type InternalHttpClientContext = {
|
|
2
|
+
/**
|
|
3
|
+
* The public base URL (config `publicUrl`) — stays the client's
|
|
4
|
+
* `baseURL` so URLs derived from it remain user-facing.
|
|
5
|
+
*/
|
|
6
|
+
publicURL: string;
|
|
7
|
+
/**
|
|
8
|
+
* The server's own listen address (e.g. http://localhost:3010/) —
|
|
9
|
+
* where the transport actually dispatches requests.
|
|
10
|
+
*/
|
|
11
|
+
internalURL: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/adapters/http/internal-client/types.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,yBAAyB,GAAG;IACpC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/index.ts"],"names":[],"mappings":"AAOA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { OAUTH2_ISSUANCE_PATHS, isOAuth2IssuancePath, normalizeRequestPath } from "./issuance.mjs";
|
|
4
5
|
import { AuthorizationMiddleware } from "./module.mjs";
|
|
5
6
|
import { createAuthorizationMiddleware } from "./factory.mjs";
|
|
6
|
-
export { AuthorizationMiddleware, createAuthorizationMiddleware };
|
|
7
|
+
export { AuthorizationMiddleware, OAUTH2_ISSUANCE_PATHS, createAuthorizationMiddleware, isOAuth2IssuancePath, normalizeRequestPath };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OAuth2 issuance surface a cookie credential must NEVER reach (plan 088).
|
|
3
|
+
*
|
|
4
|
+
* An ambient origin-wide cookie fills the identity slot every one of these
|
|
5
|
+
* routes reads, so without this list one script execution anywhere on the IdP
|
|
6
|
+
* origin could POST `/authorize` with its own PKCE challenge against the
|
|
7
|
+
* `account-console` client (public, `builtIn` and therefore auto-consenting),
|
|
8
|
+
* carry the code to `/token` and walk away with a full token pair. The cookie
|
|
9
|
+
* would have converted itself back into a portable bearer, and `HttpOnly`
|
|
10
|
+
* would have bought exactly one hop.
|
|
11
|
+
*
|
|
12
|
+
* Nothing legitimate is excluded: the hosted auth console posts its consent
|
|
13
|
+
* with its own bearer, and the account-link routes are deliberately absent
|
|
14
|
+
* (completing one requires an interactive login at an external provider inside
|
|
15
|
+
* the victim's browser, which same-origin script cannot drive).
|
|
16
|
+
*
|
|
17
|
+
* `HTTPOAuth2IdentityGrantType` is unregistered today but mints a grant
|
|
18
|
+
* straight from the request identity, so it would become live the day it is
|
|
19
|
+
* wired. Do not narrow this list without re-reading plan 088, finding 2.
|
|
20
|
+
*/
|
|
21
|
+
export declare const OAUTH2_ISSUANCE_PATHS: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Normalize a request path the way routup's matcher sees it.
|
|
24
|
+
*
|
|
25
|
+
* The check runs in the middleware, on `event.path`, BEFORE routing, so an
|
|
26
|
+
* equality test against the raw pathname would miss a request that still
|
|
27
|
+
* reaches the handler. Two properties of the matcher matter (path-to-regexp
|
|
28
|
+
* v8, as routup configures it):
|
|
29
|
+
*
|
|
30
|
+
* - it is **case insensitive** (no `sensitive` option is passed), so `/TOKEN`
|
|
31
|
+
* routes to the token controller;
|
|
32
|
+
* - it tolerates ONE trailing slash (`/token/`).
|
|
33
|
+
*
|
|
34
|
+
* Repeated slashes are collapsed as well. Those do not route (`//token`
|
|
35
|
+
* matches nothing), so collapsing can only widen the refusal, which is the
|
|
36
|
+
* safe direction: a denied path merely stays anonymous.
|
|
37
|
+
*/
|
|
38
|
+
export declare function normalizeRequestPath(input: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the path addresses the OAuth2 issuance surface (the route itself or
|
|
41
|
+
* anything below it: `/token/introspect`, `/token/revoke`, and whatever a
|
|
42
|
+
* later mount adds under these prefixes).
|
|
43
|
+
*/
|
|
44
|
+
export declare function isOAuth2IssuancePath(input: string): boolean;
|
|
45
|
+
//# sourceMappingURL=issuance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issuance.d.ts","sourceRoot":"","sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/issuance.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB,EAAG,MAAM,EAI1C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAI,MAAM,CAO3D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAI,OAAO,CAU5D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
//#region src/adapters/http/middleware/built-in/authorization/issuance.ts
|
|
5
|
+
/**
|
|
6
|
+
* The OAuth2 issuance surface a cookie credential must NEVER reach (plan 088).
|
|
7
|
+
*
|
|
8
|
+
* An ambient origin-wide cookie fills the identity slot every one of these
|
|
9
|
+
* routes reads, so without this list one script execution anywhere on the IdP
|
|
10
|
+
* origin could POST `/authorize` with its own PKCE challenge against the
|
|
11
|
+
* `account-console` client (public, `builtIn` and therefore auto-consenting),
|
|
12
|
+
* carry the code to `/token` and walk away with a full token pair. The cookie
|
|
13
|
+
* would have converted itself back into a portable bearer, and `HttpOnly`
|
|
14
|
+
* would have bought exactly one hop.
|
|
15
|
+
*
|
|
16
|
+
* Nothing legitimate is excluded: the hosted auth console posts its consent
|
|
17
|
+
* with its own bearer, and the account-link routes are deliberately absent
|
|
18
|
+
* (completing one requires an interactive login at an external provider inside
|
|
19
|
+
* the victim's browser, which same-origin script cannot drive).
|
|
20
|
+
*
|
|
21
|
+
* `HTTPOAuth2IdentityGrantType` is unregistered today but mints a grant
|
|
22
|
+
* straight from the request identity, so it would become live the day it is
|
|
23
|
+
* wired. Do not narrow this list without re-reading plan 088, finding 2.
|
|
24
|
+
*/ const OAUTH2_ISSUANCE_PATHS = [
|
|
25
|
+
"/authorize",
|
|
26
|
+
"/token",
|
|
27
|
+
"/logout"
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Normalize a request path the way routup's matcher sees it.
|
|
31
|
+
*
|
|
32
|
+
* The check runs in the middleware, on `event.path`, BEFORE routing, so an
|
|
33
|
+
* equality test against the raw pathname would miss a request that still
|
|
34
|
+
* reaches the handler. Two properties of the matcher matter (path-to-regexp
|
|
35
|
+
* v8, as routup configures it):
|
|
36
|
+
*
|
|
37
|
+
* - it is **case insensitive** (no `sensitive` option is passed), so `/TOKEN`
|
|
38
|
+
* routes to the token controller;
|
|
39
|
+
* - it tolerates ONE trailing slash (`/token/`).
|
|
40
|
+
*
|
|
41
|
+
* Repeated slashes are collapsed as well. Those do not route (`//token`
|
|
42
|
+
* matches nothing), so collapsing can only widen the refusal, which is the
|
|
43
|
+
* safe direction: a denied path merely stays anonymous.
|
|
44
|
+
*/ function normalizeRequestPath(input) {
|
|
45
|
+
const value = input.toLowerCase().replace(/\/+/g, "/");
|
|
46
|
+
if (value.length > 1 && value.endsWith("/")) return value.replace(/\/+$/, "") || "/";
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Whether the path addresses the OAuth2 issuance surface (the route itself or
|
|
51
|
+
* anything below it: `/token/introspect`, `/token/revoke`, and whatever a
|
|
52
|
+
* later mount adds under these prefixes).
|
|
53
|
+
*/ function isOAuth2IssuancePath(input) {
|
|
54
|
+
const path = normalizeRequestPath(input);
|
|
55
|
+
for (const entry of OAUTH2_ISSUANCE_PATHS) if (path === entry || path.startsWith(`${entry}/`)) return true;
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { OAUTH2_ISSUANCE_PATHS, isOAuth2IssuancePath, normalizeRequestPath };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=issuance.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issuance.mjs","names":["OAUTH2_ISSUANCE_PATHS","normalizeRequestPath","input","value","toLowerCase","replace","length","endsWith","isOAuth2IssuancePath","path","entry","startsWith"],"sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/issuance.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\n/**\n * The OAuth2 issuance surface a cookie credential must NEVER reach (plan 088).\n *\n * An ambient origin-wide cookie fills the identity slot every one of these\n * routes reads, so without this list one script execution anywhere on the IdP\n * origin could POST `/authorize` with its own PKCE challenge against the\n * `account-console` client (public, `builtIn` and therefore auto-consenting),\n * carry the code to `/token` and walk away with a full token pair. The cookie\n * would have converted itself back into a portable bearer, and `HttpOnly`\n * would have bought exactly one hop.\n *\n * Nothing legitimate is excluded: the hosted auth console posts its consent\n * with its own bearer, and the account-link routes are deliberately absent\n * (completing one requires an interactive login at an external provider inside\n * the victim's browser, which same-origin script cannot drive).\n *\n * `HTTPOAuth2IdentityGrantType` is unregistered today but mints a grant\n * straight from the request identity, so it would become live the day it is\n * wired. Do not narrow this list without re-reading plan 088, finding 2.\n */\nexport const OAUTH2_ISSUANCE_PATHS : string[] = [\n '/authorize',\n '/token',\n '/logout',\n];\n\n/**\n * Normalize a request path the way routup's matcher sees it.\n *\n * The check runs in the middleware, on `event.path`, BEFORE routing, so an\n * equality test against the raw pathname would miss a request that still\n * reaches the handler. Two properties of the matcher matter (path-to-regexp\n * v8, as routup configures it):\n *\n * - it is **case insensitive** (no `sensitive` option is passed), so `/TOKEN`\n * routes to the token controller;\n * - it tolerates ONE trailing slash (`/token/`).\n *\n * Repeated slashes are collapsed as well. Those do not route (`//token`\n * matches nothing), so collapsing can only widen the refusal, which is the\n * safe direction: a denied path merely stays anonymous.\n */\nexport function normalizeRequestPath(input: string) : string {\n const value = input.toLowerCase().replace(/\\/+/g, '/');\n if (value.length > 1 && value.endsWith('/')) {\n return value.replace(/\\/+$/, '') || '/';\n }\n\n return value;\n}\n\n/**\n * Whether the path addresses the OAuth2 issuance surface (the route itself or\n * anything below it: `/token/introspect`, `/token/revoke`, and whatever a\n * later mount adds under these prefixes).\n */\nexport function isOAuth2IssuancePath(input: string) : boolean {\n const path = normalizeRequestPath(input);\n\n for (const entry of OAUTH2_ISSUANCE_PATHS) {\n if (path === entry || path.startsWith(`${entry}/`)) {\n return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;GA2BA,MAAaA,wBAAmC;CAC5C;CACA;CACA;AACH;;;;;;;;;;;;;;;;GAkBD,SAAgBC,qBAAqBC,OAAa;CAC9C,MAAMC,QAAQD,MAAME,YAAW,CAAA,CAAGC,QAAQ,QAAQ,GAAA;CAClD,IAAIF,MAAMG,SAAS,KAAKH,MAAMI,SAAS,GAAA,GACnC,OAAOJ,MAAME,QAAQ,QAAQ,EAAA,KAAO;CAGxC,OAAOF;AACX;;;;;GAOA,SAAgBK,qBAAqBN,OAAa;CAC9C,MAAMO,OAAOR,qBAAqBC,KAAAA;CAElC,KAAK,MAAMQ,SAASV,uBAChB,IAAIS,SAASC,SAASD,KAAKE,WAAW,GAAGD,MAAM,EAAE,GAC7C,OAAO;CAIf,OAAO;AACX"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { IPermissionEvaluator } from '@authup/access';
|
|
2
|
-
import type { Client, User } from '@authup/core-kit';
|
|
2
|
+
import type { Client, Session, User } from '@authup/core-kit';
|
|
3
|
+
import type { Logger } from '@authup/server-kit';
|
|
3
4
|
import type { OAuth2TokenPayload } from '@authup/specs';
|
|
4
5
|
import type { IAppEvent } from 'routup';
|
|
5
6
|
import { type BasicAuthorizationHeader, type BearerAuthorizationHeader } from 'hapic';
|
|
6
|
-
import type { ICredentialsAuthenticator, IIdentityResolver, IOAuth2TokenVerifier, ISessionManager } from '../../../../../core/index.ts';
|
|
7
|
+
import type { ICredentialsAuthenticator, IIdentityResolver, IOAuth2TokenVerifier, ISessionManager, ISessionRepository } from '../../../../../core/index.ts';
|
|
7
8
|
import type { HTTPAuthorizationMiddlewareContext, HTTPAuthorizationMiddlewareOptions } from './types.ts';
|
|
8
9
|
export declare class AuthorizationMiddleware {
|
|
9
10
|
protected options: HTTPAuthorizationMiddlewareOptions;
|
|
@@ -11,11 +12,34 @@ export declare class AuthorizationMiddleware {
|
|
|
11
12
|
protected permissionEvaluator: IPermissionEvaluator;
|
|
12
13
|
protected identityResolver: IIdentityResolver;
|
|
13
14
|
protected sessionManager: ISessionManager;
|
|
15
|
+
protected sessionRepository: ISessionRepository;
|
|
16
|
+
protected logger?: Logger;
|
|
14
17
|
protected clientAuthenticator: ICredentialsAuthenticator<Client>;
|
|
15
18
|
protected userAuthenticator: ICredentialsAuthenticator<User>;
|
|
16
19
|
constructor(ctx: HTTPAuthorizationMiddlewareContext);
|
|
17
20
|
run(event: IAppEvent): Promise<void>;
|
|
18
21
|
protected runInner(event: IAppEvent): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* The console session cookie (plan 088): an opaque credential naming an
|
|
24
|
+
* `auth_sessions` row, presented instead of a bearer token by a console
|
|
25
|
+
* served from the API's own origin.
|
|
26
|
+
*
|
|
27
|
+
* It NEVER throws and never rejects a request. Anything missing, stale or
|
|
28
|
+
* refused simply leaves the request anonymous, which the route's own
|
|
29
|
+
* `ForceLoggedIn` guard then answers — the same outcome as sending no
|
|
30
|
+
* credential at all. A cookie is ambient, so a request that merely carries
|
|
31
|
+
* a bad one is not necessarily a request that meant to use it.
|
|
32
|
+
*/
|
|
33
|
+
protected runCookieSession(event: IAppEvent): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Slide the session's expiry, throttled.
|
|
36
|
+
*
|
|
37
|
+
* Cookie mode has no refresh grant, so without this an active console user
|
|
38
|
+
* would be signed out once the session reached its lifetime, mid-task
|
|
39
|
+
* (plan 088: a credential change must not become a session-policy change
|
|
40
|
+
* by omission).
|
|
41
|
+
*/
|
|
42
|
+
protected refreshCookieSession(event: IAppEvent, session: Session, secret: string): Promise<void>;
|
|
19
43
|
/**
|
|
20
44
|
* @throws JWTError
|
|
21
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/adapters/http/middleware/built-in/authorization/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAM9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAOxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAEjC,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EACR,yBAAyB,EACzB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EACrB,MAAM,8BAA8B,CAAC;AActC,OAAO,KAAK,EAAE,kCAAkC,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAIzG,qBAAa,uBAAuB;IAChC,SAAS,CAAC,OAAO,EAAE,kCAAkC,CAAC;IAItD,SAAS,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAEpD,SAAS,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAIpD,SAAS,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IAE9C,SAAS,CAAC,cAAc,EAAG,eAAe,CAAC;IAE3C,SAAS,CAAC,iBAAiB,EAAG,kBAAkB,CAAC;IAEjD,SAAS,CAAC,MAAM,CAAC,EAAG,MAAM,CAAC;IAI3B,SAAS,CAAC,mBAAmB,EAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAElE,SAAS,CAAC,iBAAiB,EAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;gBAIlD,GAAG,EAAE,kCAAkC;IAuB7C,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;cAmB1B,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BzD;;;;;;;;;;OAUG;cACa,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAuEjE;;;;;;;OAOG;cACa,oBAAoB,CAChC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAiChB;;OAEG;cACa,+BAA+B,CAC3C,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,yBAAyB;cAgErB,wBAAwB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBtG;;;;;;;;;OASG;cACa,oBAAoB,CAChC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,kBAAkB;cAsDf,8BAA8B,CAC1C,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,wBAAwB;CA+BvC"}
|