Expand description
Layer implementations used in RPC
Structs§
- A layer that adds a new JWT token to every request using
AuthClientService
. - Automatically authenticates every client request with the given
secret
. - This is an Http middleware layer that acts as an interceptor for
Authorization
headers. Incoming requests are dispatched to an innerAuthValidator
. Invalid requests are blocked and the validator’s error response is returned. Valid requests are instead dispatched to the next layer along the chain. - This type is the actual implementation of the middleware. It follows the [
Service
] specification to correctly proxy Http requests to its inner service after headers validation. - Claims in JWT are used to represent a set of information about an entity.
- This layer is a wrapper around [
tower_http::compression::CompressionLayer
] that integrates with jsonrpsee’s HTTP types. It automatically compresses responses based on the client’s Accept-Encoding header. - Implements JWT validation logics and integrates to an Http
AuthLayer
by implementing theAuthValidator
trait. - Value-object holding a reference to a hex-encoded 256-bit secret key.
- A future representing the response of an RPC request
Enums§
- Errors returned by the
JwtSecret
Traits§
- General purpose trait to validate Http Authorization headers. It’s supposed to be integrated as a validator trait into an
AuthLayer
.
Functions§
- Helper function to convert a secret into a Bearer auth header value with claims according to https://github.com/ethereum/execution-apis/blob/main/src/engine/authentication.md#jwt-claims. The token is valid for 60 seconds.