openagent-weave · handler
Declared module signatures, types, configuration, and source documentation.
Source: openagent-sdk/adapters/weave/src/handler.rs. SHA-256: 2ad6b50295c742b7653914b2efde11a8675a44d569a7e2038e03a82f33dd3ea7.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
handler::HandshakeHandler
Orchestrates OAAP handshakes for both initiator and responder roles.
The handler holds references to the peer auth store and session store,
and coordinates the multi-step handshake against the swarm's
WeaveAuthBehaviour.
pub struct HandshakeHandler {
}Source line: 31.
handler::HandshakeHandler::new
Creates a new handler.
pub fn new(config: WeaveAuthConfig, local_did: String) -> Self;Source line: 41.
handler::HandshakeHandler::with_session_store
Creates a handler with an external session store.
pub fn with_session_store(
config: WeaveAuthConfig,
local_did: String,
session_store: Arc<dyn SessionStore>,
) -> Self;Source line: 51.
handler::HandshakeHandler::peer_store
Returns a reference to the peer auth store.
pub fn peer_store(&self) -> &PeerAuthStore;Source line: 65.
handler::HandshakeHandler::local_did
Returns the local DID.
pub fn local_did(&self) -> &str;Source line: 70.
handler::HandshakeHandler::initiate
Initiate a handshake with a remote peer (Step 1: send PRESENT).
Returns the OutboundRequestId for tracking the challenge response.
pub fn initiate(
&self,
behaviour: &mut WeaveAuthBehaviour,
peer: &PeerId,
present: PresentMessage,
) -> Result<OutboundRequestId, WeaveAuthError>;Source line: 81.
handler::HandshakeHandler::handle_challenge
Process a CHALLENGE response from the responder (received after PRESENT).
Returns the challenge message for the caller to sign and build a PROVE.
pub fn handle_challenge(
&self,
peer: &PeerId,
challenge: &ChallengeMessage,
) -> Result<(), WeaveAuthError>;Source line: 105.
handler::HandshakeHandler::send_prove
Send Step 3 (PROVE) to the responder.
pub fn send_prove(
&self,
behaviour: &mut WeaveAuthBehaviour,
peer: &PeerId,
prove: ProveMessage,
) -> Result<OutboundRequestId, WeaveAuthError>;Source line: 132.
handler::HandshakeHandler::handle_established
Process an ESTABLISHED response (received after PROVE).
pub fn handle_established(
&self,
peer: &PeerId,
established: &EstablishedMessage,
) -> Result<(), WeaveAuthError>;Source line: 144.
handler::HandshakeHandler::handle_present
Handle an inbound PRESENT request (Step 1 from a remote initiator).
Returns a ChallengeMessage to send back.
pub async fn handle_present(
&self,
peer: &PeerId,
present: &PresentMessage,
) -> Result<ChallengeMessage, WeaveAuthError>;Source line: 186.
handler::HandshakeHandler::handle_prove
Handle an inbound PROVE request (Step 3 from a remote initiator).
Returns an EstablishedMessage on success.
pub async fn handle_prove(
&self,
peer: &PeerId,
prove: &ProveMessage,
) -> Result<EstablishedMessage, WeaveAuthError>;Source line: 246.
handler::HandshakeHandler::respond
Respond to an inbound request on its response channel.
pub fn respond(
&self,
behaviour: &mut WeaveAuthBehaviour,
channel: ResponseChannel<HandshakeResponse>,
response: HandshakeResponse,
) -> Result<(), WeaveAuthError>;Source line: 322.