Add OIDC authentication support for HTTP client testing#88
Merged
lambdalisue merged 3 commits intomainfrom Jan 5, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds OpenID Connect (OIDC) authentication support to the HTTP client testing framework. It upgrades the @probitas/client-http dependency to version 0.7.0 and exposes OIDC functionality through a new subpath export.
Key Changes
- Upgraded
@probitas/client-httpfrom v0.6.0 to v0.7.0 to enable OIDC capabilities - Added
./client/http/oidcsubpath export for accessing OIDC-specific functionality - Created comprehensive example scenario demonstrating OIDC discovery, authorization code grant flow, and authenticated requests
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
deno.json |
Updated @probitas/client-http dependency to ^0.7.0, added OIDC subpath export, and updated related dependencies (@deno/graph, @faker-js/faker, @probitas/reporter) |
deno.lock |
Automatic lock file updates reflecting dependency version changes |
src/client/http/oidc.ts |
Simple re-export of OIDC functionality from the framework package |
src/client/http.ts |
Exposed OIDC namespace through import and named export, consistent with SQL client pattern |
probitas/16-client-http-oidc.probitas.ts |
Comprehensive example scenario demonstrating OIDC discovery, auto/manual configuration, authentication flows, token management, and error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…o execution Scenario files were failing to resolve bare specifiers because the subprocess script runs from a temp directory, not the project directory. While cwd was set correctly, Deno searches for deno.json relative to the script file location, not cwd. This fix automatically detects and passes --config=<path> to the subprocess when neither --deno-config nor --deno-no-config is specified, ensuring import maps work correctly for scenario files. The implementation matches Deno's native behavior (since v1.18): recursively searches from cwd upward through parent directories until a config file is found or the filesystem root is reached. Changes: - Add hasConfigOption() to check if config option already specified - Add findDenoConfig() to recursively locate deno.json/deno.jsonc - Add ensureConfigOption() to auto-inject --config if needed - Update spawnDenoSubprocess() to use ensured config options Users can still override with --deno-config=<path> or opt out with --deno-no-config to preserve existing behavior.
Expose OIDC (OpenID Connect) authentication capabilities through the client.http.oidc namespace. This enables automated OAuth 2.0 flows with token management for testing authenticated HTTP APIs. Changes: - Add ./client/http/oidc subpath export in deno.json - Re-export @probitas/client-http/oidc through src/client/http/oidc.ts - Provide comprehensive scenario example (16-client-http-oidc.probitas.ts) demonstrating authorization code grant flow with auto-discovery The scenario validates: - OIDC discovery endpoint integration - Authorization code grant with automated login - Automatic Authorization header injection - Token persistence across multiple requests - Manual OIDC configuration option - Error handling for invalid credentials
d1df3af to
1f7389e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@probitas/client-httpto ^0.7.0 to include OIDC capabilities./client/http/oidcsubpath export for OpenID Connect authenticationWhy
Testing modern web applications requires authenticating against OAuth 2.0/OIDC providers. This PR enables users to write scenarios that:
The example scenario demonstrates both auto-discovery (via
/.well-known/openid-configuration) and manual OIDC configuration, covering common real-world use cases.Changes
@probitas/client-httpdependency and add OIDC subpath exportclient.http.oidcAuthorizationheader injectionTest Plan
deno task verifyto ensure all checks pass