Skip to main content

Crate httpsig_hyper

Crate httpsig_hyper 

Source
Expand description

§httpsig-hyper

httpsig-hyper is a crate that provides a convenient API for Hyper users to handle HTTP signatures. This crate extends hyper’s http request and response messages with the ability to generate and verify HTTP signatures. Additionally it also provides a way to set and verify content-digest header.

§Async-first design

The primary API is fully async, allowing concurrent processing of multiple signatures via MessageSignatureReq and MessageSignatureRes.

§Blocking API

When the blocking feature is enabled (on by default), synchronous wrappers are provided via MessageSignatureReqSync and MessageSignatureResSync. These use futures::executor::block_on internally and are intended exclusively for non-async contexts.

§Panics

Calling any *_sync method from within an async runtime (e.g. inside a tokio::spawn task) will panic. If you are already in an async context, use the async methods directly.

Modules§

prelude

Enums§

ContentDigestType
content-digest header type
HyperDigestError
Error type for http signature for hyper
HyperSigError
Error type for http signature for hyper

Traits§

ContentDigest
MessageSignature
A trait about the http message signature common to both request and response
MessageSignatureReq
A trait about http message signature for request
MessageSignatureReqSync
Synchronous counterpart of MessageSignatureReq.
MessageSignatureRes
A trait about http message signature for response
MessageSignatureResSync
Synchronous counterpart of MessageSignatureRes.
RequestContentDigest
A trait to set the http content digest in request in base64
ResponseContentDigest
A trait to set the http content digest in response in base64

Type Aliases§

HyperDigestResult
Result type for http signature
HyperSigResult
Result type for http signature