pub struct HttpOobiResolver { /* private fields */ }Expand description
An SSRF-hardened HTTP client for the OOBI static KEL layout.
Implementations§
Source§impl HttpOobiResolver
impl HttpOobiResolver
Sourcepub fn new(base_url: impl Into<String>) -> Result<Self, HttpOobiError>
pub fn new(base_url: impl Into<String>) -> Result<Self, HttpOobiError>
Build a resolver for base_url. The client follows no redirects
(so a 3xx to a private IP cannot exfiltrate) and inherits the hardened
timeouts / TLS floor.
Args:
base_url: The OOBI host base (e.g.https://registry.example).
Sourcepub fn allow_private(self, allow: bool) -> Self
pub fn allow_private(self, allow: bool) -> Self
Allow plain http and private/loopback hosts — for intranet registries
and tests against a local server. Off by default.
Sourcepub async fn fetch_kel(
&self,
prefix: &Prefix,
) -> Result<Vec<Event>, HttpOobiError>
pub async fn fetch_kel( &self, prefix: &Prefix, ) -> Result<Vec<Event>, HttpOobiError>
Fetch and parse the KEL for prefix from the OOBI layout.
Applies the SSRF guard, maps HTTP status to the error taxonomy, enforces
the size cap, and parses the keri.cesr body (a JSON array of events).
Returns raw events — the caller applies the prefix-binding guard.
Args:
prefix: Thedid:keri:prefix (AID) to resolve.
Auto Trait Implementations§
impl !RefUnwindSafe for HttpOobiResolver
impl !UnwindSafe for HttpOobiResolver
impl Freeze for HttpOobiResolver
impl Send for HttpOobiResolver
impl Sync for HttpOobiResolver
impl Unpin for HttpOobiResolver
impl UnsafeUnpin for HttpOobiResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more