near / near-jsonrpc-client-rs

Lower-level API for interfacing with the NEAR Protocol via JSONRPC.
https://docs.rs/near-jsonrpc-client
Apache License 2.0
47 stars 41 forks source link

introduce Authorization::bearer helper method #121

Closed miraclx closed 1 year ago

miraclx commented 1 year ago

Resolves #118.

Introduces the Authorization::bearer method that adds an equivalent Authorization: Bearer ... entry into the request headers.

This function does no input validation beyond that it's a header value, not that it's a valid JWT.

We offload the guarantee of it being a valid utf-8 string to the caller.