qa360 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -262
- package/{cli/dist → dist}/commands/ai.js +1 -1
- package/{cli/dist → dist}/commands/ask.js +49 -22
- package/{cli/dist → dist}/commands/coverage.js +17 -4
- package/{cli/dist → dist}/commands/crawl.js +2 -2
- package/{cli/dist → dist}/commands/doctor.js +2 -2
- package/{cli/dist → dist}/commands/explain.js +2 -2
- package/{cli/dist → dist}/commands/flakiness.js +1 -1
- package/{cli/dist → dist}/commands/generate.js +12 -5
- package/{cli/dist → dist}/commands/history.js +1 -1
- package/{cli/dist → dist}/commands/monitor.js +3 -3
- package/{cli/dist → dist}/commands/ollama.js +14 -6
- package/{cli/dist → dist}/commands/pack.js +2 -2
- package/{cli/dist → dist}/commands/regression.js +1 -1
- package/{cli/dist → dist}/commands/repair.js +1 -1
- package/{cli/dist → dist}/commands/retry.js +1 -1
- package/{cli/dist → dist}/commands/run.d.ts +5 -1
- package/{cli/dist → dist}/commands/run.js +87 -1
- package/{cli/dist → dist}/commands/secrets.js +1 -1
- package/{cli/dist → dist}/commands/serve.js +1 -1
- package/{cli/dist → dist}/commands/slo.js +1 -1
- package/{cli/dist → dist}/commands/verify.js +1 -1
- package/{cli/dist → dist}/core/adapters/playwright-native-api.d.ts +2 -0
- package/{cli/dist → dist}/core/adapters/playwright-native-api.js +20 -1
- package/{cli/dist → dist}/core/adapters/playwright-ui.d.ts +21 -0
- package/dist/core/adapters/playwright-ui.js +2050 -0
- package/{cli/dist → dist}/core/ai/ollama-provider.d.ts +4 -0
- package/{cli/dist → dist}/core/ai/ollama-provider.js +41 -8
- package/{cli/dist → dist}/core/artifacts/ui-artifacts.js +24 -4
- package/dist/core/auth/backup-codes-provider.d.ts +91 -0
- package/dist/core/auth/backup-codes-provider.js +215 -0
- package/{cli/dist → dist}/core/auth/basic-auth-provider.d.ts +6 -0
- package/{cli/dist → dist}/core/auth/basic-auth-provider.js +24 -6
- package/dist/core/auth/digest-auth-provider.d.ts +116 -0
- package/dist/core/auth/digest-auth-provider.js +244 -0
- package/dist/core/auth/hcaptcha-handler.d.ts +103 -0
- package/dist/core/auth/hcaptcha-handler.js +288 -0
- package/{cli/dist → dist}/core/auth/index.d.ts +81 -4
- package/{cli/dist → dist}/core/auth/index.js +15 -1
- package/dist/core/auth/oauth-handler.d.ts +408 -0
- package/dist/core/auth/oauth-handler.js +636 -0
- package/{cli/dist → dist}/core/auth/oauth2-provider.d.ts +9 -0
- package/dist/core/auth/oauth2-provider.js +227 -0
- package/dist/core/auth/otp-provider.d.ts +93 -0
- package/dist/core/auth/otp-provider.js +288 -0
- package/dist/core/auth/recaptcha-handler.d.ts +119 -0
- package/dist/core/auth/recaptcha-handler.js +301 -0
- package/dist/core/auth/remember-me-handler.d.ts +142 -0
- package/dist/core/auth/remember-me-handler.js +255 -0
- package/dist/core/auth/saml-handler.d.ts +173 -0
- package/dist/core/auth/saml-handler.js +364 -0
- package/dist/core/auth/webauthn-handler.d.ts +182 -0
- package/dist/core/auth/webauthn-handler.js +310 -0
- package/dist/core/crawler/advanced-interactions.d.ts +342 -0
- package/dist/core/crawler/advanced-interactions.js +1069 -0
- package/dist/core/crawler/blob-url-download-handler.d.ts +145 -0
- package/dist/core/crawler/blob-url-download-handler.js +392 -0
- package/dist/core/crawler/consent-handler.d.ts +49 -0
- package/dist/core/crawler/consent-handler.js +258 -0
- package/dist/core/crawler/cookie-manager.d.ts +166 -0
- package/dist/core/crawler/cookie-manager.js +353 -0
- package/dist/core/crawler/coop-coep-handler.d.ts +136 -0
- package/dist/core/crawler/coop-coep-handler.js +338 -0
- package/dist/core/crawler/csp-handler.d.ts +151 -0
- package/dist/core/crawler/csp-handler.js +415 -0
- package/dist/core/crawler/download-handler.d.ts +155 -0
- package/dist/core/crawler/download-handler.js +370 -0
- package/dist/core/crawler/email-testing-handler.d.ts +214 -0
- package/dist/core/crawler/email-testing-handler.js +398 -0
- package/dist/core/crawler/error-tracking-handler.d.ts +177 -0
- package/dist/core/crawler/error-tracking-handler.js +378 -0
- package/dist/core/crawler/form-handler.d.ts +100 -0
- package/dist/core/crawler/form-handler.js +465 -0
- package/dist/core/crawler/framework-wait-handler.d.ts +96 -0
- package/dist/core/crawler/framework-wait-handler.js +464 -0
- package/dist/core/crawler/geolocation-handler.d.ts +112 -0
- package/dist/core/crawler/geolocation-handler.js +276 -0
- package/dist/core/crawler/index.d.ts +78 -0
- package/{cli/dist → dist}/core/crawler/index.js +74 -1
- package/dist/core/crawler/intelligent-selector-generator.d.ts +164 -0
- package/dist/core/crawler/intelligent-selector-generator.js +612 -0
- package/{cli/dist → dist}/core/crawler/journey-generator.js +44 -1
- package/{cli/dist → dist}/core/crawler/page-analyzer.d.ts +16 -1
- package/{cli/dist → dist}/core/crawler/page-analyzer.js +469 -17
- package/dist/core/crawler/permissions-handler.d.ts +112 -0
- package/dist/core/crawler/permissions-handler.js +236 -0
- package/dist/core/crawler/permissions-policy-handler.d.ts +113 -0
- package/dist/core/crawler/permissions-policy-handler.js +402 -0
- package/dist/core/crawler/presets.d.ts +100 -0
- package/dist/core/crawler/presets.js +887 -0
- package/dist/core/crawler/repl-debug-handler.d.ts +105 -0
- package/dist/core/crawler/repl-debug-handler.js +552 -0
- package/dist/core/crawler/reporting-api-handler.d.ts +212 -0
- package/dist/core/crawler/reporting-api-handler.js +344 -0
- package/{cli/dist → dist}/core/crawler/selector-generator.d.ts +9 -0
- package/{cli/dist → dist}/core/crawler/selector-generator.js +99 -23
- package/dist/core/crawler/site-profiler.d.ts +89 -0
- package/dist/core/crawler/site-profiler.js +290 -0
- package/dist/core/crawler/sourcemaps-handler.d.ts +144 -0
- package/dist/core/crawler/sourcemaps-handler.js +420 -0
- package/dist/core/crawler/stacked-modals-handler.d.ts +118 -0
- package/dist/core/crawler/stacked-modals-handler.js +429 -0
- package/dist/core/crawler/trusted-types-handler.d.ts +149 -0
- package/dist/core/crawler/trusted-types-handler.js +413 -0
- package/{cli/dist → dist}/core/crawler/types.d.ts +68 -2
- package/dist/core/crawler/wait-strategies.d.ts +108 -0
- package/dist/core/crawler/wait-strategies.js +399 -0
- package/dist/core/fixtures/factories.d.ts +180 -0
- package/dist/core/fixtures/factories.js +279 -0
- package/dist/core/fixtures/index.d.ts +6 -0
- package/dist/core/fixtures/index.js +6 -0
- package/{cli/dist → dist}/core/generation/crawler-pack-generator.d.ts +13 -3
- package/dist/core/generation/crawler-pack-generator.js +232 -0
- package/{cli/dist → dist}/core/generation/index.d.ts +2 -0
- package/{cli/dist → dist}/core/generation/index.js +2 -0
- package/{cli/dist → dist}/core/index.d.ts +2 -0
- package/{cli/dist → dist}/core/index.js +4 -0
- package/dist/core/network/index.d.ts +7 -0
- package/dist/core/network/index.js +7 -0
- package/dist/core/network/network-manager.d.ts +237 -0
- package/dist/core/network/network-manager.js +343 -0
- package/dist/core/network/network-simulator.d.ts +158 -0
- package/dist/core/network/network-simulator.js +261 -0
- package/{cli/dist → dist}/core/pack/validator.js +2 -2
- package/{cli/dist → dist}/core/pack-v2/migrator.d.ts +5 -0
- package/{cli/dist → dist}/core/pack-v2/migrator.js +81 -6
- package/{cli/dist → dist}/core/pack-v2/validator.js +4 -3
- package/{cli/dist → dist}/core/pom/base-page.js +1 -1
- package/{cli/dist → dist}/core/pom/loader.js +1 -1
- package/dist/core/reporting/index.d.ts +9 -0
- package/dist/core/reporting/index.js +10 -0
- package/dist/core/reporting/junit-reporter.d.ts +114 -0
- package/dist/core/reporting/junit-reporter.js +306 -0
- package/{cli/dist → dist}/core/runner/e2e-helpers.d.ts +1 -1
- package/{cli/dist → dist}/core/runner/e2e-helpers.js +2 -2
- package/{cli/dist → dist}/core/runner/phase3-runner.d.ts +3 -0
- package/{cli/dist → dist}/core/runner/phase3-runner.js +45 -14
- package/dist/core/sharding/test-sharding.d.ts +137 -0
- package/dist/core/sharding/test-sharding.js +233 -0
- package/dist/core/storage/cookie-manager.d.ts +160 -0
- package/dist/core/storage/cookie-manager.js +268 -0
- package/dist/core/storage/index.d.ts +7 -0
- package/dist/core/storage/index.js +7 -0
- package/dist/core/storage/storage-helpers.d.ts +138 -0
- package/dist/core/storage/storage-helpers.js +315 -0
- package/dist/core/test-helpers/index.d.ts +6 -0
- package/dist/core/test-helpers/index.js +6 -0
- package/dist/core/test-helpers/state-reset.d.ts +119 -0
- package/dist/core/test-helpers/state-reset.js +234 -0
- package/{cli/dist → dist}/core/types/pack-v1.d.ts +15 -2
- package/{cli/dist → dist}/core/types/pack-v2.d.ts +1 -1
- package/dist/core/upload/chunked-uploader.d.ts +150 -0
- package/dist/core/upload/chunked-uploader.js +289 -0
- package/dist/core/upload/index.d.ts +11 -0
- package/dist/core/upload/index.js +8 -0
- package/dist/core/upload/mime-validator.d.ts +119 -0
- package/dist/core/upload/mime-validator.js +373 -0
- package/dist/core/upload/presigned-uploader.d.ts +118 -0
- package/dist/core/upload/presigned-uploader.js +274 -0
- package/dist/core/utils/device-emulation.d.ts +194 -0
- package/dist/core/utils/device-emulation.js +380 -0
- package/dist/core/utils/index.d.ts +8 -0
- package/dist/core/utils/index.js +8 -0
- package/dist/core/utils/retry.d.ts +145 -0
- package/dist/core/utils/retry.js +242 -0
- package/dist/core/utils/smart-wait.d.ts +133 -0
- package/dist/core/utils/smart-wait.js +417 -0
- package/dist/core/visual/index.d.ts +7 -0
- package/dist/core/visual/index.js +7 -0
- package/dist/core/visual/pixel-diff.d.ts +87 -0
- package/dist/core/visual/pixel-diff.js +213 -0
- package/dist/core/visual/screenshot-helper.d.ts +130 -0
- package/dist/core/visual/screenshot-helper.js +223 -0
- package/{cli/dist → dist}/index.js +2 -3
- package/{cli/dist → dist}/utils/config.d.ts +1 -1
- package/{cli/dist → dist}/utils/config.js +36 -3
- package/examples/README.md +160 -0
- package/examples/accessibility.yml +48 -0
- package/examples/api-basic.yml +27 -0
- package/examples/complete.yml +146 -0
- package/examples/crawler.yml +38 -0
- package/examples/fullstack.yml +78 -0
- package/examples/security.yml +58 -0
- package/examples/ui-advanced.yml +49 -0
- package/examples/ui-basic.yml +24 -0
- package/package.json +33 -67
- package/CHANGELOG.md +0 -330
- package/CONTRIBUTING.md +0 -273
- package/QUICK_START.md +0 -191
- package/cli/CHANGELOG.md +0 -84
- package/cli/LICENSE +0 -24
- package/cli/README.md +0 -222
- package/cli/dist/core/adapters/playwright-ui.js +0 -864
- package/cli/dist/core/auth/oauth2-provider.js +0 -114
- package/cli/dist/core/coverage/analyzer.d.ts +0 -101
- package/cli/dist/core/coverage/analyzer.js +0 -415
- package/cli/dist/core/coverage/collector.d.ts +0 -74
- package/cli/dist/core/coverage/collector.js +0 -459
- package/cli/dist/core/coverage/config.d.ts +0 -37
- package/cli/dist/core/coverage/config.js +0 -156
- package/cli/dist/core/coverage/index.d.ts +0 -11
- package/cli/dist/core/coverage/index.js +0 -15
- package/cli/dist/core/coverage/types.d.ts +0 -267
- package/cli/dist/core/coverage/types.js +0 -6
- package/cli/dist/core/coverage/vault.d.ts +0 -95
- package/cli/dist/core/coverage/vault.js +0 -405
- package/cli/dist/core/crawler/index.d.ts +0 -57
- package/cli/dist/core/fixtures/index.d.ts +0 -8
- package/cli/dist/core/fixtures/index.js +0 -8
- package/cli/dist/core/generation/crawler-pack-generator.js +0 -231
- package/cli/dist/core/reporting/index.d.ts +0 -6
- package/cli/dist/core/reporting/index.js +0 -6
- package/cli/dist/core/visual/index.d.ts +0 -6
- package/cli/dist/core/visual/index.js +0 -6
- package/cli/package.json +0 -76
- package/core/LICENSE +0 -24
- package/core/README.md +0 -105
- package/core/package.json +0 -90
- package/core/schemas/pack.schema.json +0 -236
- /package/{cli/bin → bin}/qa360.js +0 -0
- /package/{cli/dist → dist}/cli-minimal.d.ts +0 -0
- /package/{cli/dist → dist}/cli-minimal.js +0 -0
- /package/{cli/dist → dist}/commands/ai.d.ts +0 -0
- /package/{cli/dist → dist}/commands/ask.d.ts +0 -0
- /package/{cli/dist → dist}/commands/coverage.d.ts +0 -0
- /package/{cli/dist → dist}/commands/crawl.d.ts +0 -0
- /package/{cli/dist → dist}/commands/doctor.d.ts +0 -0
- /package/{cli/dist → dist}/commands/examples.d.ts +0 -0
- /package/{cli/dist → dist}/commands/examples.js +0 -0
- /package/{cli/dist → dist}/commands/explain.d.ts +0 -0
- /package/{cli/dist → dist}/commands/flakiness.d.ts +0 -0
- /package/{cli/dist → dist}/commands/generate.d.ts +0 -0
- /package/{cli/dist → dist}/commands/history.d.ts +0 -0
- /package/{cli/dist → dist}/commands/init.d.ts +0 -0
- /package/{cli/dist → dist}/commands/init.js +0 -0
- /package/{cli/dist → dist}/commands/monitor.d.ts +0 -0
- /package/{cli/dist → dist}/commands/ollama.d.ts +0 -0
- /package/{cli/dist → dist}/commands/pack.d.ts +0 -0
- /package/{cli/dist → dist}/commands/regression.d.ts +0 -0
- /package/{cli/dist → dist}/commands/repair.d.ts +0 -0
- /package/{cli/dist → dist}/commands/report.d.ts +0 -0
- /package/{cli/dist → dist}/commands/report.js +0 -0
- /package/{cli/dist → dist}/commands/retry.d.ts +0 -0
- /package/{cli/dist → dist}/commands/scan.d.ts +0 -0
- /package/{cli/dist → dist}/commands/scan.js +0 -0
- /package/{cli/dist → dist}/commands/secrets.d.ts +0 -0
- /package/{cli/dist → dist}/commands/serve.d.ts +0 -0
- /package/{cli/dist → dist}/commands/slo.d.ts +0 -0
- /package/{cli/dist → dist}/commands/verify.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/gitleaks-secrets.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/gitleaks-secrets.js +0 -0
- /package/{cli/dist → dist}/core/adapters/jest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/jest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/k6-perf.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/k6-perf.js +0 -0
- /package/{cli/dist → dist}/core/adapters/osv-deps.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/osv-deps.js +0 -0
- /package/{cli/dist → dist}/core/adapters/playwright-native-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/playwright-native-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/pytest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/pytest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/semgrep-sast.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/semgrep-sast.js +0 -0
- /package/{cli/dist → dist}/core/adapters/unit-test-types.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/unit-test-types.js +0 -0
- /package/{cli/dist → dist}/core/adapters/vitest-adapter.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/vitest-adapter.js +0 -0
- /package/{cli/dist → dist}/core/adapters/zap-dast.d.ts +0 -0
- /package/{cli/dist → dist}/core/adapters/zap-dast.js +0 -0
- /package/{cli/dist → dist}/core/ai/anthropic-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/anthropic-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/deepseek-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/deepseek-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/index.js +0 -0
- /package/{cli/dist → dist}/core/ai/llm-client.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/llm-client.js +0 -0
- /package/{cli/dist → dist}/core/ai/mock-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/mock-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/openai-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/openai-provider.js +0 -0
- /package/{cli/dist → dist}/core/ai/provider-factory.d.ts +0 -0
- /package/{cli/dist → dist}/core/ai/provider-factory.js +0 -0
- /package/{cli/dist → dist}/core/artifacts/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/artifacts/index.js +0 -0
- /package/{cli/dist → dist}/core/artifacts/ui-artifacts.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/engine.js +0 -0
- /package/{cli/dist → dist}/core/assertions/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/index.js +0 -0
- /package/{cli/dist → dist}/core/assertions/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/assertions/types.js +0 -0
- /package/{cli/dist → dist}/core/auth/api-key-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/api-key-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/aws-iam-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/aws-iam-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/azure-ad-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/azure-ad-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/gcp-adc-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/gcp-adc-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/jwt-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/jwt-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/manager.js +0 -0
- /package/{cli/dist → dist}/core/auth/totp-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/totp-provider.js +0 -0
- /package/{cli/dist → dist}/core/auth/ui-login-provider.d.ts +0 -0
- /package/{cli/dist → dist}/core/auth/ui-login-provider.js +0 -0
- /package/{cli/dist → dist}/core/cache/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/cache/index.js +0 -0
- /package/{cli/dist → dist}/core/cache/lru-cache.d.ts +0 -0
- /package/{cli/dist → dist}/core/cache/lru-cache.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/analyzer.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/analyzer.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/collector.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/collector.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/config.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/config.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/index.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/index.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/types.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/types.js +0 -0
- /package/{cli/dist/core → dist}/core/coverage/vault.d.ts +0 -0
- /package/{cli/dist/core → dist}/core/coverage/vault.js +0 -0
- /package/{cli/dist → dist}/core/crawler/journey-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/crawler/types.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/assets.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/assets.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/index.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/server.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/server.js +0 -0
- /package/{cli/dist → dist}/core/dashboard/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/dashboard/types.js +0 -0
- /package/{cli/dist → dist}/core/discoverer/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/discoverer/index.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/loader.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/resolver.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/resolver.js +0 -0
- /package/{cli/dist → dist}/core/fixtures/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/fixtures/types.js +0 -0
- /package/{cli/dist → dist}/core/flakiness/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/flakiness/index.js +0 -0
- /package/{cli/dist → dist}/core/generation/code-formatter.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/code-formatter.js +0 -0
- /package/{cli/dist → dist}/core/generation/code-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/code-generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/pack-generator.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/pack-generator.js +0 -0
- /package/{cli/dist → dist}/core/generation/prompt-builder.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/prompt-builder.js +0 -0
- /package/{cli/dist → dist}/core/generation/source-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/source-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/generation/test-optimizer.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/test-optimizer.js +0 -0
- /package/{cli/dist → dist}/core/generation/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/generation/types.js +0 -0
- /package/{cli/dist → dist}/core/hooks/compose.d.ts +0 -0
- /package/{cli/dist → dist}/core/hooks/compose.js +0 -0
- /package/{cli/dist → dist}/core/hooks/runner.d.ts +0 -0
- /package/{cli/dist → dist}/core/hooks/runner.js +0 -0
- /package/{cli/dist → dist}/core/pack/migrator.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack/migrator.js +0 -0
- /package/{cli/dist → dist}/core/pack/validator.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/index.js +0 -0
- /package/{cli/dist → dist}/core/pack-v2/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/pack-v2/loader.js +0 -0
- /package/{cli/dist → dist}/core/pack-v2/validator.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/index.js +0 -0
- /package/{cli/dist → dist}/core/parallel/parallel-runner.d.ts +0 -0
- /package/{cli/dist → dist}/core/parallel/parallel-runner.js +0 -0
- /package/{cli/dist → dist}/core/pom/base-page.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/index.js +0 -0
- /package/{cli/dist → dist}/core/pom/loader.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/pom/types.js +0 -0
- /package/{cli/dist → dist}/core/proof/bundle.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/bundle.js +0 -0
- /package/{cli/dist → dist}/core/proof/canonicalize.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/canonicalize.js +0 -0
- /package/{cli/dist → dist}/core/proof/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/index.js +0 -0
- /package/{cli/dist → dist}/core/proof/schema.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/schema.js +0 -0
- /package/{cli/dist → dist}/core/proof/signer.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/signer.js +0 -0
- /package/{cli/dist → dist}/core/proof/verifier.d.ts +0 -0
- /package/{cli/dist → dist}/core/proof/verifier.js +0 -0
- /package/{cli/dist → dist}/core/regression/detector.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/detector.js +0 -0
- /package/{cli/dist → dist}/core/regression/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/index.js +0 -0
- /package/{cli/dist → dist}/core/regression/trend-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/trend-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/regression/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/types.js +0 -0
- /package/{cli/dist → dist}/core/regression/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/regression/vault.js +0 -0
- /package/{cli/dist → dist}/core/repair/engine/fixer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/engine/fixer.js +0 -0
- /package/{cli/dist → dist}/core/repair/engine/suggestion-engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/engine/suggestion-engine.js +0 -0
- /package/{cli/dist → dist}/core/repair/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/index.js +0 -0
- /package/{cli/dist → dist}/core/repair/repairer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/repairer.js +0 -0
- /package/{cli/dist → dist}/core/repair/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/types.js +0 -0
- /package/{cli/dist → dist}/core/repair/utils/error-analyzer.d.ts +0 -0
- /package/{cli/dist → dist}/core/repair/utils/error-analyzer.js +0 -0
- /package/{cli/dist → dist}/core/reporting/html-reporter.d.ts +0 -0
- /package/{cli/dist → dist}/core/reporting/html-reporter.js +0 -0
- /package/{cli/dist → dist}/core/retry/flakiness-integration.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/flakiness-integration.js +0 -0
- /package/{cli/dist → dist}/core/retry/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/index.js +0 -0
- /package/{cli/dist → dist}/core/retry/retry-engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/retry-engine.js +0 -0
- /package/{cli/dist → dist}/core/retry/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/types.js +0 -0
- /package/{cli/dist → dist}/core/retry/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/retry/vault.js +0 -0
- /package/{cli/dist → dist}/core/schemas/pack.schema.json +0 -0
- /package/{cli/dist → dist}/core/secrets/crypto.d.ts +0 -0
- /package/{cli/dist → dist}/core/secrets/crypto.js +0 -0
- /package/{cli/dist → dist}/core/secrets/manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/secrets/manager.js +0 -0
- /package/{cli/dist → dist}/core/security/redaction-patterns-extended.d.ts +0 -0
- /package/{cli/dist → dist}/core/security/redaction-patterns-extended.js +0 -0
- /package/{cli/dist → dist}/core/security/redactor.d.ts +0 -0
- /package/{cli/dist → dist}/core/security/redactor.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/assertion-healer.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/assertion-healer.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/engine.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/engine.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/index.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/selector-healer.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/selector-healer.js +0 -0
- /package/{cli/dist → dist}/core/self-healing/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/self-healing/types.js +0 -0
- /package/{cli/dist → dist}/core/serve/diagnostics-collector.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/diagnostics-collector.js +0 -0
- /package/{cli/dist → dist}/core/serve/health-checker.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/health-checker.js +0 -0
- /package/{cli/dist → dist}/core/serve/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/index.js +0 -0
- /package/{cli/dist → dist}/core/serve/metrics-collector.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/metrics-collector.js +0 -0
- /package/{cli/dist → dist}/core/serve/process-manager.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/process-manager.js +0 -0
- /package/{cli/dist → dist}/core/serve/server.d.ts +0 -0
- /package/{cli/dist → dist}/core/serve/server.js +0 -0
- /package/{cli/dist → dist}/core/slo/config.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/config.js +0 -0
- /package/{cli/dist → dist}/core/slo/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/index.js +0 -0
- /package/{cli/dist → dist}/core/slo/sli-calculator.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/sli-calculator.js +0 -0
- /package/{cli/dist → dist}/core/slo/slo-tracker.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/slo-tracker.js +0 -0
- /package/{cli/dist → dist}/core/slo/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/types.js +0 -0
- /package/{cli/dist → dist}/core/slo/vault.d.ts +0 -0
- /package/{cli/dist → dist}/core/slo/vault.js +0 -0
- /package/{cli/dist → dist}/core/tui/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/index.js +0 -0
- /package/{cli/dist → dist}/core/tui/monitor.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/monitor.js +0 -0
- /package/{cli/dist → dist}/core/tui/renderer.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/renderer.js +0 -0
- /package/{cli/dist → dist}/core/tui/types.d.ts +0 -0
- /package/{cli/dist → dist}/core/tui/types.js +0 -0
- /package/{cli/dist → dist}/core/types/pack-v1.js +0 -0
- /package/{cli/dist → dist}/core/types/pack-v2.js +0 -0
- /package/{cli/dist → dist}/core/types/trust-score.d.ts +0 -0
- /package/{cli/dist → dist}/core/types/trust-score.js +0 -0
- /package/{cli/dist → dist}/core/vault/cas.d.ts +0 -0
- /package/{cli/dist → dist}/core/vault/cas.js +0 -0
- /package/{cli/dist → dist}/core/vault/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/vault/index.js +0 -0
- /package/{cli/dist → dist}/core/visual/visual-regression.d.ts +0 -0
- /package/{cli/dist → dist}/core/visual/visual-regression.js +0 -0
- /package/{cli/dist → dist}/core/watch/index.d.ts +0 -0
- /package/{cli/dist → dist}/core/watch/index.js +0 -0
- /package/{cli/dist → dist}/core/watch/watch-mode.d.ts +0 -0
- /package/{cli/dist → dist}/core/watch/watch-mode.js +0 -0
- /package/{cli/dist → dist}/generators/index.d.ts +0 -0
- /package/{cli/dist → dist}/generators/index.js +0 -0
- /package/{cli/dist → dist}/generators/json-reporter.d.ts +0 -0
- /package/{cli/dist → dist}/generators/json-reporter.js +0 -0
- /package/{cli/dist → dist}/generators/test-generator.d.ts +0 -0
- /package/{cli/dist → dist}/generators/test-generator.js +0 -0
- /package/{cli/dist → dist}/index.d.ts +0 -0
- /package/{cli/dist → dist}/scanners/dom-scanner.d.ts +0 -0
- /package/{cli/dist → dist}/scanners/dom-scanner.js +0 -0
- /package/{cli/dist → dist}/scanners/index.d.ts +0 -0
- /package/{cli/dist → dist}/scanners/index.js +0 -0
- /package/{cli/dist → dist}/schemas/pack.schema.json +0 -0
- /package/{cli/dist → dist}/types/scan.d.ts +0 -0
- /package/{cli/dist → dist}/types/scan.js +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* QA360 Authentication Module
|
|
3
3
|
*
|
|
4
4
|
* Comprehensive authentication support for test adapters.
|
|
5
|
-
* Supports JWT, OAuth2, API Keys, Bearer tokens, Basic auth, TOTP,
|
|
5
|
+
* Supports JWT, OAuth2, API Keys, Bearer tokens, Basic auth, Digest auth, TOTP,
|
|
6
6
|
* UI Login, and cloud provider credentials (GCP, AWS, Azure).
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -14,6 +14,14 @@ export interface AuthResult {
|
|
|
14
14
|
error?: string;
|
|
15
15
|
expiresAt?: number;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* HTTP credentials for native browser authentication (Basic Auth popup)
|
|
19
|
+
*/
|
|
20
|
+
export interface HttpCredentials {
|
|
21
|
+
username: string;
|
|
22
|
+
password: string;
|
|
23
|
+
origin?: string;
|
|
24
|
+
}
|
|
17
25
|
/**
|
|
18
26
|
* Authentication credentials to be used in requests
|
|
19
27
|
*/
|
|
@@ -23,6 +31,12 @@ export interface AuthCredentials {
|
|
|
23
31
|
queryParams?: Record<string, string>;
|
|
24
32
|
cookies?: Cookie[];
|
|
25
33
|
body?: Record<string, unknown>;
|
|
34
|
+
/** P0: HTTP credentials for native browser Basic Auth popup (WWW-Authenticate) */
|
|
35
|
+
httpCredentials?: HttpCredentials;
|
|
36
|
+
/** P0: OAuth2 refresh token for token renewal */
|
|
37
|
+
refreshToken?: string;
|
|
38
|
+
/** Token expiration timestamp */
|
|
39
|
+
expiresAt?: number;
|
|
26
40
|
}
|
|
27
41
|
/**
|
|
28
42
|
* Cookie for session management
|
|
@@ -39,7 +53,7 @@ export interface Cookie {
|
|
|
39
53
|
/**
|
|
40
54
|
* Authentication types
|
|
41
55
|
*/
|
|
42
|
-
export type AuthType = 'none' | 'jwt' | 'oauth2' | 'api_key' | 'bearer' | 'basic' | 'totp' | 'ui_login' | 'gcp_adc' | 'aws_iam' | 'azure_ad';
|
|
56
|
+
export type AuthType = 'none' | 'jwt' | 'oauth2' | 'api_key' | 'bearer' | 'basic' | 'digest' | 'otp' | 'totp' | 'backup_codes' | 'ui_login' | 'gcp_adc' | 'aws_iam' | 'azure_ad';
|
|
43
57
|
/**
|
|
44
58
|
* Base configuration for all auth providers
|
|
45
59
|
*/
|
|
@@ -75,9 +89,15 @@ export interface OAuth2AuthConfig extends BaseAuthConfig {
|
|
|
75
89
|
client_id: string;
|
|
76
90
|
client_secret?: string;
|
|
77
91
|
scopes?: string[];
|
|
78
|
-
grant_type?: 'client_credentials' | 'authorization_code' | 'password';
|
|
92
|
+
grant_type?: 'client_credentials' | 'authorization_code' | 'password' | 'refresh_token';
|
|
79
93
|
username?: string;
|
|
80
94
|
password?: string;
|
|
95
|
+
/** P0: Pre-existing refresh token for token refresh flow */
|
|
96
|
+
refresh_token?: string;
|
|
97
|
+
/** P0: Auto-refresh token before expiration */
|
|
98
|
+
auto_refresh?: boolean;
|
|
99
|
+
/** P0: Refresh token URL (if different from token_url) */
|
|
100
|
+
refresh_url?: string;
|
|
81
101
|
}
|
|
82
102
|
/**
|
|
83
103
|
* API Key configuration
|
|
@@ -103,6 +123,20 @@ export interface BasicAuthConfig extends BaseAuthConfig {
|
|
|
103
123
|
type: 'basic';
|
|
104
124
|
username: string;
|
|
105
125
|
password: string;
|
|
126
|
+
/** P0: Use native browser popup (WWW-Authenticate) instead of headers */
|
|
127
|
+
useNativePopup?: boolean;
|
|
128
|
+
/** Optional: only send to specific origin */
|
|
129
|
+
origin?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Digest auth configuration (P1 - RFC 2617)
|
|
133
|
+
*/
|
|
134
|
+
export interface DigestAuthConfig extends BaseAuthConfig {
|
|
135
|
+
type: 'digest';
|
|
136
|
+
username: string;
|
|
137
|
+
password: string;
|
|
138
|
+
/** Protection space (optional, will use server value if not provided) */
|
|
139
|
+
realm?: string;
|
|
106
140
|
}
|
|
107
141
|
/**
|
|
108
142
|
* TOTP configuration
|
|
@@ -114,6 +148,26 @@ export interface TOTPAuthConfig extends BaseAuthConfig {
|
|
|
114
148
|
period?: number;
|
|
115
149
|
algorithm?: 'sha1' | 'sha256' | 'sha512';
|
|
116
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* OTP configuration (P1 - SMS/Email OTP and Magic Links)
|
|
153
|
+
*/
|
|
154
|
+
export interface OTPAuthConfig extends BaseAuthConfig {
|
|
155
|
+
type: 'otp';
|
|
156
|
+
/** Delivery method */
|
|
157
|
+
method: 'sms' | 'email' | 'magic_link';
|
|
158
|
+
/** Phone number (for SMS) or email address */
|
|
159
|
+
destination: string;
|
|
160
|
+
/** The OTP code received (if already available) */
|
|
161
|
+
code?: string;
|
|
162
|
+
/** Magic link URL (if received) */
|
|
163
|
+
magicLinkUrl?: string;
|
|
164
|
+
/** OTP verification endpoint */
|
|
165
|
+
verifyEndpoint?: string;
|
|
166
|
+
/** OTP request endpoint */
|
|
167
|
+
requestEndpoint?: string;
|
|
168
|
+
/** Additional headers for OTP requests */
|
|
169
|
+
headers?: Record<string, string>;
|
|
170
|
+
}
|
|
117
171
|
/**
|
|
118
172
|
* UI Login configuration
|
|
119
173
|
*/
|
|
@@ -129,6 +183,16 @@ export interface UILoginAuthConfig extends BaseAuthConfig {
|
|
|
129
183
|
totp_selector?: string;
|
|
130
184
|
session_file?: string;
|
|
131
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Backup Codes configuration (P1 - 2FA recovery codes)
|
|
188
|
+
*/
|
|
189
|
+
export interface BackupCodesAuthConfig extends BaseAuthConfig {
|
|
190
|
+
type: 'backup_codes';
|
|
191
|
+
/** The backup code to verify */
|
|
192
|
+
code: string;
|
|
193
|
+
/** List of valid backup codes (for validation) */
|
|
194
|
+
validCodes?: string[];
|
|
195
|
+
}
|
|
132
196
|
/**
|
|
133
197
|
* GCP ADC configuration
|
|
134
198
|
*/
|
|
@@ -169,7 +233,7 @@ export interface NoneAuthConfig extends BaseAuthConfig {
|
|
|
169
233
|
/**
|
|
170
234
|
* Union type for all auth configurations
|
|
171
235
|
*/
|
|
172
|
-
export type AuthConfig = JWTAuthConfig | OAuth2AuthConfig | APIKeyAuthConfig | BearerAuthConfig | BasicAuthConfig | TOTPAuthConfig | UILoginAuthConfig | GCPADCConfig | AWSIamConfig | AzureADConfig | NoneAuthConfig;
|
|
236
|
+
export type AuthConfig = JWTAuthConfig | OAuth2AuthConfig | APIKeyAuthConfig | BearerAuthConfig | BasicAuthConfig | DigestAuthConfig | OTPAuthConfig | TOTPAuthConfig | BackupCodesAuthConfig | UILoginAuthConfig | GCPADCConfig | AWSIamConfig | AzureADConfig | NoneAuthConfig;
|
|
173
237
|
/**
|
|
174
238
|
* Base interface for all auth providers
|
|
175
239
|
*/
|
|
@@ -230,9 +294,22 @@ export { JWTProvider } from './jwt-provider.js';
|
|
|
230
294
|
export { OAuth2Provider } from './oauth2-provider.js';
|
|
231
295
|
export { APIKeyProvider } from './api-key-provider.js';
|
|
232
296
|
export { BearerProvider, BasicAuthProvider } from './basic-auth-provider.js';
|
|
297
|
+
export { DigestAuthProvider } from './digest-auth-provider.js';
|
|
298
|
+
export { OTPProvider } from './otp-provider.js';
|
|
233
299
|
export { TOTPProvider } from './totp-provider.js';
|
|
300
|
+
export { BackupCodesProvider } from './backup-codes-provider.js';
|
|
234
301
|
export { UILoginProvider } from './ui-login-provider.js';
|
|
235
302
|
export { GCPADCProvider } from './gcp-adc-provider.js';
|
|
236
303
|
export { AWSIamProvider } from './aws-iam-provider.js';
|
|
237
304
|
export { AzureADProvider } from './azure-ad-provider.js';
|
|
305
|
+
export { OAuthHandler, OAuthToken, OAuthError, ImplicitFlowResult, MockOAuthServer, createOAuthHandler, createMockOAuthServer, } from './oauth-handler.js';
|
|
306
|
+
export type { OAuthConfig, OIDCClaims, OIDCAddress, OIDCUserInfo, } from './oauth-handler.js';
|
|
307
|
+
export { RecaptchaHandler, createRecaptchaHandler, RECAPTCHA_V2_TEST_SITE_KEY, RECAPTCHA_V3_TEST_SITE_KEY, } from './recaptcha-handler.js';
|
|
308
|
+
export { HcaptchaHandler, createHcaptchaHandler, HCAPTCHA_TEST_SITE_KEY, } from './hcaptcha-handler.js';
|
|
309
|
+
export { SAMLHandler, createSAMLHandler } from './saml-handler.js';
|
|
310
|
+
export type { SAMLConfig, SAMLResponse, ParsedSAMLResponse, SAMLAssertion } from './saml-handler.js';
|
|
311
|
+
export { WebAuthnHandler, createWebAuthnHandler } from './webauthn-handler.js';
|
|
312
|
+
export type { WebAuthnConfig, WebAuthnUser, WebAuthnCredential, RegistrationResult, AuthenticationResult } from './webauthn-handler.js';
|
|
313
|
+
export { RememberMeHandler, createRememberMeHandler } from './remember-me-handler.js';
|
|
314
|
+
export type { RememberMeConfig, RememberMeToken, RememberMeResult } from './remember-me-handler.js';
|
|
238
315
|
export { AuthManager, authManager, authenticate, createAuthHeaders, applyAuthToRequest, AuthError } from './manager.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* QA360 Authentication Module
|
|
3
3
|
*
|
|
4
4
|
* Comprehensive authentication support for test adapters.
|
|
5
|
-
* Supports JWT, OAuth2, API Keys, Bearer tokens, Basic auth, TOTP,
|
|
5
|
+
* Supports JWT, OAuth2, API Keys, Bearer tokens, Basic auth, Digest auth, TOTP,
|
|
6
6
|
* UI Login, and cloud provider credentials (GCP, AWS, Azure).
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -73,10 +73,24 @@ export { JWTProvider } from './jwt-provider.js';
|
|
|
73
73
|
export { OAuth2Provider } from './oauth2-provider.js';
|
|
74
74
|
export { APIKeyProvider } from './api-key-provider.js';
|
|
75
75
|
export { BearerProvider, BasicAuthProvider } from './basic-auth-provider.js';
|
|
76
|
+
export { DigestAuthProvider } from './digest-auth-provider.js';
|
|
77
|
+
export { OTPProvider } from './otp-provider.js';
|
|
76
78
|
export { TOTPProvider } from './totp-provider.js';
|
|
79
|
+
export { BackupCodesProvider } from './backup-codes-provider.js';
|
|
77
80
|
export { UILoginProvider } from './ui-login-provider.js';
|
|
78
81
|
export { GCPADCProvider } from './gcp-adc-provider.js';
|
|
79
82
|
export { AWSIamProvider } from './aws-iam-provider.js';
|
|
80
83
|
export { AzureADProvider } from './azure-ad-provider.js';
|
|
84
|
+
// Re-export OAuth handler (P1)
|
|
85
|
+
export { OAuthHandler, MockOAuthServer, createOAuthHandler, createMockOAuthServer, } from './oauth-handler.js';
|
|
86
|
+
// Re-export CAPTCHA handlers (P1)
|
|
87
|
+
export { RecaptchaHandler, createRecaptchaHandler, RECAPTCHA_V2_TEST_SITE_KEY, RECAPTCHA_V3_TEST_SITE_KEY, } from './recaptcha-handler.js';
|
|
88
|
+
export { HcaptchaHandler, createHcaptchaHandler, HCAPTCHA_TEST_SITE_KEY, } from './hcaptcha-handler.js';
|
|
89
|
+
// Re-export SAML 2.0 Handler (P1)
|
|
90
|
+
export { SAMLHandler, createSAMLHandler } from './saml-handler.js';
|
|
91
|
+
// Re-export WebAuthn / Passkeys Handler (P1)
|
|
92
|
+
export { WebAuthnHandler, createWebAuthnHandler } from './webauthn-handler.js';
|
|
93
|
+
// Re-export Remember Me Handler (P1)
|
|
94
|
+
export { RememberMeHandler, createRememberMeHandler } from './remember-me-handler.js';
|
|
81
95
|
// Re-export manager and factory functions
|
|
82
96
|
export { AuthManager, authManager, authenticate, createAuthHeaders, applyAuthToRequest, AuthError } from './manager.js';
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA360 OAuth Handler
|
|
3
|
+
*
|
|
4
|
+
* P0 Features: OAuth2/OIDC flow testing support
|
|
5
|
+
* - Authorization Code flow with PKCE
|
|
6
|
+
* - Implicit flow (legacy) - P1
|
|
7
|
+
* - Client Credentials flow
|
|
8
|
+
* - Refresh Token flow
|
|
9
|
+
* - Token storage and management
|
|
10
|
+
* - OpenID Connect support - P1
|
|
11
|
+
*
|
|
12
|
+
* Supports testing against:
|
|
13
|
+
* - Real OAuth providers (Google, GitHub, Auth0, etc.)
|
|
14
|
+
* - Mock OAuth servers for development
|
|
15
|
+
*/
|
|
16
|
+
import type { Page, BrowserContext } from '@playwright/test';
|
|
17
|
+
/**
|
|
18
|
+
* OAuth configuration
|
|
19
|
+
*/
|
|
20
|
+
export interface OAuthConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Authorization endpoint URL
|
|
23
|
+
*/
|
|
24
|
+
authEndpoint: string;
|
|
25
|
+
/**
|
|
26
|
+
* Token endpoint URL
|
|
27
|
+
*/
|
|
28
|
+
tokenEndpoint: string;
|
|
29
|
+
/**
|
|
30
|
+
* Client ID
|
|
31
|
+
*/
|
|
32
|
+
clientId: string;
|
|
33
|
+
/**
|
|
34
|
+
* Client secret (for confidential clients, not used in PKCE)
|
|
35
|
+
*/
|
|
36
|
+
clientSecret?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Redirect URI
|
|
39
|
+
*/
|
|
40
|
+
redirectUri: string;
|
|
41
|
+
/**
|
|
42
|
+
* Scope(s) to request
|
|
43
|
+
*/
|
|
44
|
+
scope?: string | string[];
|
|
45
|
+
/**
|
|
46
|
+
* Response type (code for Authorization Code, token for Implicit)
|
|
47
|
+
*/
|
|
48
|
+
responseType?: 'code' | 'token' | 'id_token' | 'id_token token';
|
|
49
|
+
/**
|
|
50
|
+
* Use PKCE (Proof Key for Code Exchange)
|
|
51
|
+
*/
|
|
52
|
+
usePKCE?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* State parameter for CSRF protection
|
|
55
|
+
*/
|
|
56
|
+
state?: string;
|
|
57
|
+
/**
|
|
58
|
+
* OpenID Connect configuration
|
|
59
|
+
*/
|
|
60
|
+
oidc?: {
|
|
61
|
+
/** Issuer URL for discovery */
|
|
62
|
+
issuer?: string;
|
|
63
|
+
/** UserInfo endpoint */
|
|
64
|
+
userInfoEndpoint?: string;
|
|
65
|
+
/** JWKS URI for token verification */
|
|
66
|
+
jwksUri?: string;
|
|
67
|
+
/** Expected issuer for ID token validation */
|
|
68
|
+
expectedIssuer?: string;
|
|
69
|
+
/** Expected audience for ID token validation */
|
|
70
|
+
expectedAudience?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* OAuth token response
|
|
75
|
+
*/
|
|
76
|
+
export interface OAuthToken {
|
|
77
|
+
access_token: string;
|
|
78
|
+
token_type?: string;
|
|
79
|
+
expires_in?: number;
|
|
80
|
+
refresh_token?: string;
|
|
81
|
+
scope?: string;
|
|
82
|
+
id_token?: string;
|
|
83
|
+
/** OpenID Connect: Issuer identifier */
|
|
84
|
+
issuer?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* OpenID Connect ID Token claims
|
|
88
|
+
*/
|
|
89
|
+
export interface OIDCClaims {
|
|
90
|
+
/** Issuer identifier */
|
|
91
|
+
iss: string;
|
|
92
|
+
/** Subject identifier */
|
|
93
|
+
sub: string;
|
|
94
|
+
/** Audience(s) */
|
|
95
|
+
aud: string | string[];
|
|
96
|
+
/** Expiration time */
|
|
97
|
+
exp: number;
|
|
98
|
+
/** Issued at time */
|
|
99
|
+
iat: number;
|
|
100
|
+
/** Authentication time */
|
|
101
|
+
auth_time?: number;
|
|
102
|
+
/** nonce */
|
|
103
|
+
nonce?: string;
|
|
104
|
+
/** Authentication context class reference */
|
|
105
|
+
acr?: string;
|
|
106
|
+
/** Authentication methods references */
|
|
107
|
+
amr?: string[];
|
|
108
|
+
/** Authorized party */
|
|
109
|
+
azp?: string;
|
|
110
|
+
/** Email address */
|
|
111
|
+
email?: string;
|
|
112
|
+
/** Email verified status */
|
|
113
|
+
email_verified?: boolean;
|
|
114
|
+
/** Phone number */
|
|
115
|
+
phone_number?: string;
|
|
116
|
+
/** Phone verified status */
|
|
117
|
+
phone_number_verified?: boolean;
|
|
118
|
+
/** Given name */
|
|
119
|
+
given_name?: string;
|
|
120
|
+
/** Family name */
|
|
121
|
+
family_name?: string;
|
|
122
|
+
/** Full name */
|
|
123
|
+
name?: string;
|
|
124
|
+
/** Locale */
|
|
125
|
+
locale?: string;
|
|
126
|
+
/** Picture URL */
|
|
127
|
+
picture?: string;
|
|
128
|
+
/** Profile URL */
|
|
129
|
+
profile?: string;
|
|
130
|
+
/** Website URL */
|
|
131
|
+
website?: string;
|
|
132
|
+
/** Gender */
|
|
133
|
+
gender?: string;
|
|
134
|
+
/** Birthdate */
|
|
135
|
+
birthdate?: string;
|
|
136
|
+
/** Zone info */
|
|
137
|
+
zoneinfo?: string;
|
|
138
|
+
/** Updated at time */
|
|
139
|
+
updated_at?: number;
|
|
140
|
+
/** Address */
|
|
141
|
+
address?: OIDCAddress;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* OIDC Address claims
|
|
145
|
+
*/
|
|
146
|
+
export interface OIDCAddress {
|
|
147
|
+
formatted?: string;
|
|
148
|
+
street_address?: string;
|
|
149
|
+
locality?: string;
|
|
150
|
+
region?: string;
|
|
151
|
+
postal_code?: string;
|
|
152
|
+
country?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* UserInfo endpoint response
|
|
156
|
+
*/
|
|
157
|
+
export interface OIDCUserInfo {
|
|
158
|
+
sub: string;
|
|
159
|
+
name?: string;
|
|
160
|
+
given_name?: string;
|
|
161
|
+
family_name?: string;
|
|
162
|
+
middle_name?: string;
|
|
163
|
+
nickname?: string;
|
|
164
|
+
preferred_username?: string;
|
|
165
|
+
profile?: string;
|
|
166
|
+
picture?: string;
|
|
167
|
+
website?: string;
|
|
168
|
+
email?: string;
|
|
169
|
+
email_verified?: boolean;
|
|
170
|
+
gender?: string;
|
|
171
|
+
birthdate?: string;
|
|
172
|
+
zoneinfo?: string;
|
|
173
|
+
locale?: string;
|
|
174
|
+
phone_number?: string;
|
|
175
|
+
phone_number_verified?: boolean;
|
|
176
|
+
address?: OIDCAddress;
|
|
177
|
+
updated_at?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Implicit flow result (token from URL fragment)
|
|
181
|
+
*/
|
|
182
|
+
export interface ImplicitFlowResult {
|
|
183
|
+
success: boolean;
|
|
184
|
+
accessToken?: string;
|
|
185
|
+
idToken?: string;
|
|
186
|
+
tokenType?: string;
|
|
187
|
+
expires_in?: string;
|
|
188
|
+
state?: string;
|
|
189
|
+
error?: OAuthError;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* OAuth error response
|
|
193
|
+
*/
|
|
194
|
+
export interface OAuthError {
|
|
195
|
+
error: string;
|
|
196
|
+
error_description?: string;
|
|
197
|
+
error_uri?: string;
|
|
198
|
+
state?: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Authorization result
|
|
202
|
+
*/
|
|
203
|
+
export interface AuthorizationResult {
|
|
204
|
+
success: boolean;
|
|
205
|
+
code?: string;
|
|
206
|
+
error?: OAuthError;
|
|
207
|
+
state?: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* OAuth Handler class
|
|
211
|
+
*/
|
|
212
|
+
export declare class OAuthHandler {
|
|
213
|
+
private context;
|
|
214
|
+
private config;
|
|
215
|
+
private accessToken;
|
|
216
|
+
private refreshToken;
|
|
217
|
+
private codeVerifier;
|
|
218
|
+
private generatedState;
|
|
219
|
+
constructor(context: BrowserContext, config: OAuthConfig);
|
|
220
|
+
/**
|
|
221
|
+
* Generate random string for PKCE code verifier and state
|
|
222
|
+
* Uses cryptographically secure random bytes
|
|
223
|
+
*/
|
|
224
|
+
private generateRandomString;
|
|
225
|
+
/**
|
|
226
|
+
* Generate code challenge for PKCE
|
|
227
|
+
* Uses SHA256 to create challenge from verifier
|
|
228
|
+
*/
|
|
229
|
+
private generateCodeChallenge;
|
|
230
|
+
/**
|
|
231
|
+
* Build authorization URL
|
|
232
|
+
* P0: Construct the OAuth authorization URL with all required parameters
|
|
233
|
+
*/
|
|
234
|
+
buildAuthorizationURL(options?: {
|
|
235
|
+
state?: string;
|
|
236
|
+
codeChallenge?: string;
|
|
237
|
+
}): string;
|
|
238
|
+
/**
|
|
239
|
+
* Start Authorization Code flow with PKCE
|
|
240
|
+
* P0: Begin OAuth login flow
|
|
241
|
+
*
|
|
242
|
+
* @returns Authorization URL to navigate user to
|
|
243
|
+
*/
|
|
244
|
+
startAuthorizationFlow(): Promise<{
|
|
245
|
+
authUrl: string;
|
|
246
|
+
verifier: string;
|
|
247
|
+
state: string;
|
|
248
|
+
}>;
|
|
249
|
+
/**
|
|
250
|
+
* Wait for OAuth callback
|
|
251
|
+
* P0: Wait for redirect to redirect_uri with code or error
|
|
252
|
+
*
|
|
253
|
+
* @returns Promise that resolves when callback is received
|
|
254
|
+
*/
|
|
255
|
+
waitForCallback(page: Page, timeout?: number): Promise<AuthorizationResult>;
|
|
256
|
+
/**
|
|
257
|
+
* Exchange authorization code for tokens
|
|
258
|
+
* P0: Token exchange endpoint call
|
|
259
|
+
*/
|
|
260
|
+
exchangeCodeForToken(code: string): Promise<OAuthToken>;
|
|
261
|
+
/**
|
|
262
|
+
* Client Credentials flow
|
|
263
|
+
* P1: Server-to-server authentication without user interaction
|
|
264
|
+
* Used for machine-to-machine communication (service accounts, daemons, etc.)
|
|
265
|
+
*
|
|
266
|
+
* @returns OAuth token response (no refresh token in this flow)
|
|
267
|
+
*/
|
|
268
|
+
clientCredentials(): Promise<OAuthToken>;
|
|
269
|
+
/**
|
|
270
|
+
* Refresh access token
|
|
271
|
+
* P0: Use refresh token to get new access token
|
|
272
|
+
*/
|
|
273
|
+
refreshAccessToken(): Promise<OAuthToken>;
|
|
274
|
+
/**
|
|
275
|
+
* Get current access token
|
|
276
|
+
*/
|
|
277
|
+
getAccessToken(): string | null;
|
|
278
|
+
/**
|
|
279
|
+
* Get refresh token
|
|
280
|
+
*/
|
|
281
|
+
getRefreshToken(): string | null;
|
|
282
|
+
/**
|
|
283
|
+
* Set tokens manually (useful for testing)
|
|
284
|
+
*/
|
|
285
|
+
setTokens(tokens: {
|
|
286
|
+
accessToken: string;
|
|
287
|
+
refreshToken?: string;
|
|
288
|
+
}): void;
|
|
289
|
+
/**
|
|
290
|
+
* Clear all stored tokens
|
|
291
|
+
*/
|
|
292
|
+
clearTokens(): void;
|
|
293
|
+
/**
|
|
294
|
+
* Full Authorization Code flow with PKCE
|
|
295
|
+
* P0: Complete OAuth flow from start to token exchange
|
|
296
|
+
*
|
|
297
|
+
* @param page - Playwright page instance
|
|
298
|
+
* @param userInteraction - Optional function to handle user login
|
|
299
|
+
* @returns OAuth token response
|
|
300
|
+
*/
|
|
301
|
+
completeFlow(page: Page, userInteraction?: (page: Page, authUrl: string) => Promise<void>): Promise<OAuthToken>;
|
|
302
|
+
/**
|
|
303
|
+
* Set authorization header with Bearer token
|
|
304
|
+
* P0: Helper to set Authorization header for API requests
|
|
305
|
+
*/
|
|
306
|
+
setAuthHeader(page: Page): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* P1: Implicit Flow (legacy OAuth2)
|
|
309
|
+
* Token is returned directly in URL fragment after redirect
|
|
310
|
+
*
|
|
311
|
+
* Note: Implicit flow is deprecated in OAuth 2.1. Use Authorization Code with PKCE instead.
|
|
312
|
+
* This method is provided for testing legacy applications.
|
|
313
|
+
*
|
|
314
|
+
* @param page - Playwright page instance
|
|
315
|
+
* @param userInteraction - Optional function to handle user login
|
|
316
|
+
* @returns Implicit flow result with access token from URL fragment
|
|
317
|
+
*/
|
|
318
|
+
implicitFlow(page: Page, userInteraction?: (page: Page, authUrl: string) => Promise<void>): Promise<ImplicitFlowResult>;
|
|
319
|
+
/**
|
|
320
|
+
* P1: Wait for Implicit Flow callback
|
|
321
|
+
* Extracts token from URL fragment (hash)
|
|
322
|
+
*/
|
|
323
|
+
waitForImplicitCallback(page: Page, timeout?: number): Promise<ImplicitFlowResult>;
|
|
324
|
+
/**
|
|
325
|
+
* P1: OpenID Connect - Parse and validate ID token
|
|
326
|
+
*
|
|
327
|
+
* @param idToken - JWT ID token from OAuth response
|
|
328
|
+
* @returns Parsed OIDC claims
|
|
329
|
+
*/
|
|
330
|
+
parseIDToken(idToken: string): Promise<OIDCClaims>;
|
|
331
|
+
/**
|
|
332
|
+
* P1: OpenID Connect - Fetch UserInfo from endpoint
|
|
333
|
+
*
|
|
334
|
+
* @param accessToken - Access token for authorization
|
|
335
|
+
* @returns UserInfo response
|
|
336
|
+
*/
|
|
337
|
+
fetchUserInfo(accessToken: string): Promise<OIDCUserInfo>;
|
|
338
|
+
/**
|
|
339
|
+
* P1: OpenID Connect - Complete OIDC flow
|
|
340
|
+
* Performs Authorization Code flow and fetches UserInfo
|
|
341
|
+
*
|
|
342
|
+
* @param page - Playwright page instance
|
|
343
|
+
* @param userInteraction - Optional function to handle user login
|
|
344
|
+
* @returns OAuth token + parsed ID token claims + UserInfo
|
|
345
|
+
*/
|
|
346
|
+
completeOIDCFlow(page: Page, userInteraction?: (page: Page, authUrl: string) => Promise<void>): Promise<{
|
|
347
|
+
token: OAuthToken;
|
|
348
|
+
idTokenClaims?: OIDCClaims;
|
|
349
|
+
userInfo?: OIDCUserInfo;
|
|
350
|
+
}>;
|
|
351
|
+
/**
|
|
352
|
+
* P1: Validate ID token signature (basic validation)
|
|
353
|
+
* For full signature validation, you need the JWKS and crypto verification
|
|
354
|
+
*
|
|
355
|
+
* @param idToken - JWT ID token to validate
|
|
356
|
+
* @returns Validation result with claims if valid
|
|
357
|
+
*/
|
|
358
|
+
validateIDToken(idToken: string): Promise<{
|
|
359
|
+
valid: boolean;
|
|
360
|
+
claims?: OIDCClaims;
|
|
361
|
+
error?: string;
|
|
362
|
+
}>;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Mock OAuth Server for testing
|
|
366
|
+
* Simulates OAuth endpoints for development/testing
|
|
367
|
+
*/
|
|
368
|
+
export declare class MockOAuthServer {
|
|
369
|
+
private baseUrl;
|
|
370
|
+
private authorizedCodes;
|
|
371
|
+
constructor(baseUrl?: string);
|
|
372
|
+
/**
|
|
373
|
+
* Get authorization endpoint URL
|
|
374
|
+
*/
|
|
375
|
+
getAuthEndpoint(): string;
|
|
376
|
+
/**
|
|
377
|
+
* Get token endpoint URL
|
|
378
|
+
*/
|
|
379
|
+
getTokenEndpoint(): string;
|
|
380
|
+
/**
|
|
381
|
+
* Generate a mock access token
|
|
382
|
+
*/
|
|
383
|
+
private generateMockToken;
|
|
384
|
+
/**
|
|
385
|
+
* Create a mock authorization code
|
|
386
|
+
* Stores code-to-token mapping for later exchange
|
|
387
|
+
*/
|
|
388
|
+
createAuthorizationCode(): {
|
|
389
|
+
code: string;
|
|
390
|
+
token: OAuthToken;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Validate and redeem authorization code
|
|
394
|
+
*/
|
|
395
|
+
redeemCode(code: string): OAuthToken | null;
|
|
396
|
+
/**
|
|
397
|
+
* Get OAuth config for mock server
|
|
398
|
+
*/
|
|
399
|
+
getOAuthConfig(clientId?: string, redirectUri?: string): OAuthConfig;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Convenience function to create OAuth handler
|
|
403
|
+
*/
|
|
404
|
+
export declare function createOAuthHandler(context: BrowserContext, config: OAuthConfig): OAuthHandler;
|
|
405
|
+
/**
|
|
406
|
+
* Convenience function to create mock OAuth server
|
|
407
|
+
*/
|
|
408
|
+
export declare function createMockOAuthServer(baseUrl?: string): MockOAuthServer;
|