pub type AuthContext = AuthenticatedRequest;Expand description
Authenticated request context available to tools when signed HTTP is enabled.
This context is produced by the toolkit runtime after it has:
- verified the Leader signature over the supplied canonical input hash, and
- reserved the request nonce in the Tool’s offchain replay cache.
Tools can use this context inside NexusTool::authorize to implement their own
admission policy (allowlists, task gating, rate-limits, etc) without any on-chain reads.
Terminology:
- Invoker: the node calling the tool (in Nexus, the Leader).
- Responder: the node serving the request (in Nexus, the Tool).
Aliased Type§
pub struct AuthContext {
pub leader_id: String,
pub leader_key_id: u64,
pub input_hash: [u8; 32],
pub leader_signature: [u8; 64],
pub nonce: [u8; 32],
pub context_timestamp_ms: u64,
}Fields§
§leader_id: String§leader_key_id: u64§input_hash: [u8; 32]§leader_signature: [u8; 64]§nonce: [u8; 32]§context_timestamp_ms: u64