Expand description
Layer implementations used in RPC
Structs§
- Auth
Client Layer - A layer that adds a new JWT token to every request using
AuthClientService. - Auth
Client Service - Automatically authenticates every client request with the given
secret. - Auth
Layer - This is an Http middleware layer that acts as an
interceptor for
Authorizationheaders. 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. - Auth
Service - 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
- Claims in JWT are used to represent a set of information about an entity.
- Compression
Layer - 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. - JwtAuth
Validator - Implements JWT validation logics and integrates
to an Http
AuthLayerby implementing theAuthValidatortrait. - JwtSecret
- Value-object holding a reference to a hex-encoded 256-bit secret key.
- Response
Future - A future representing the response of an RPC request
Enums§
Traits§
- Auth
Validator - General purpose trait to validate Http Authorization headers. It’s supposed to be integrated as
a validator trait into an
AuthLayer.
Functions§
- secret_
to_ bearer_ header - 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.