Commit 5828cc7
Add OAuth 1.0 authentication support with CLI integration tests
This commit implements complete OAuth 1.0 (RFC 5849) authentication support for Bruno,
bringing it to feature parity with OAuth 2.0 implementation.
Features implemented:
- OAuth 1.0 signature methods: HMAC-SHA1, HMAC-SHA256, HMAC-SHA512, RSA-SHA256, PLAINTEXT
- Parameter transmission modes: authorization header, query params, request body
- 2-legged OAuth (consumer credentials only)
- 3-legged OAuth (full authorization flow with request tokens, authorization, and access tokens)
- OAuth 1.0 credential management and storage
- Variable interpolation for all OAuth 1.0 configuration fields
Core implementation:
- packages/bruno-requests/src/auth/oauth1-helper.ts: OAuth 1.0 signing and token management
- packages/bruno-cli/src/runner/run-single-request.js: CLI OAuth 1.0 signing integration
- packages/bruno-cli/src/runner/interpolate-vars.js: OAuth 1.0 variable interpolation
- packages/bruno-cli/src/runner/prepare-request.js: OAuth 1.0 request preparation
- packages/bruno-electron/src/ipc/network/prepare-request.js: Electron OAuth 1.0 support
- packages/bruno-app/src/components/RequestPane/Auth/OAuth1/: UI components for OAuth 1.0 configuration
Test infrastructure:
- packages/bruno-tests/src/auth/oauth1/: OAuth 1.0 test server with signature validation
- utils.js: Signature validation for all methods and parameter transmission modes
- twoLegged.js: 2-legged OAuth endpoints
- threeLegged.js: 3-legged OAuth authorization flow endpoints
- packages/bruno-tests/collection_oauth1/: 8 integration test files
- 2-legged tests for all signature methods and transmission modes
- 3-legged full authorization flow test
- packages/bruno-tests/collection_level_oauth1/: Collection-level OAuth 1.0 configuration tests
- packages/bruno-requests/src/auth/oauth1-helper.spec.ts: Unit tests for OAuth 1.0 helper
Parser and converter support:
- packages/bruno-lang/v2/: .bru file format support for OAuth 1.0 auth blocks
- packages/bruno-converters/: Postman OAuth 1.0 import support
Documentation:
- Updated bruno-tests README with OAuth 1.0 test documentation
Bug fixes:
- Fixed OAuth 1.0 HMAC algorithm bug (shasha1 -> sha1)
- Fixed oauth_callback parameter handling for 3-legged flow
- Added OAuth 1.0 callback URL support to signature generation
Test results: All 7 integration tests passing (100% success rate)
- 6 two-legged OAuth tests (various signature methods and transmission modes)
- 1 three-legged OAuth flow test (complete authorization flow)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f3cb0d4 commit 5828cc7
File tree
61 files changed
+4697
-115
lines changed- packages
- bruno-app/src
- components/RequestPane/Auth
- AuthMode
- OAuth1
- utils/collections
- bruno-cli
- src
- runner
- store
- utils
- tests/runner
- bruno-converters
- src/postman
- tests/postman/postman-to-bruno
- bruno-electron
- src
- ipc/network
- store
- utils
- tests
- bruno-lang/v2
- src
- tests
- bruno-requests
- src
- auth
- bruno-schema/src/collections
- bruno-tests
- collection_level_oauth1
- environments
- collection_oauth1
- environments
- src/auth
- oauth1
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+4697
-115
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
| |||
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
0 commit comments