xrpl-py icon indicating copy to clipboard operation
xrpl-py copied to clipboard

[auth] Add custom header injection to JsonRpcBase (API key support)

Open joshuahamsa opened this issue 9 months ago • 9 comments

Summary

This PR contributes unit test coverage for the recently merged custom header support in JsonRpcBase, originally implemented by @Transia-RnD in commit 6c8bab5.

Changes • Added test_json_rpc_base.py with tests for: • Global header usage • Per-request header overrides • No-header fallback • 401/403 handling via XRPLAuthenticationException • Defined XRPLAuthenticationException (if not already present upstream) • Updated .gitignore to exclude .jrb/ local virtualenv

Context

This test suite helps confirm correctness and stability for consumers using authenticated or rate-limited XRPL infrastructure, and ensures that the new header logic behaves as expected under typical and error scenarios.

Let me know if you’d prefer the tests split out into a separate PR or further generalized to cover WebsocketBase.

joshuahamsa avatar Apr 10 '25 02:04 joshuahamsa