docs.rs failed to build iron-hmac-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: iron-hmac-0.6.0

iron-hmac

HMAC middleware for iron

Authenticates incoming requests by computing the HMAC and performing a constant-time string comparison with the provided value. An HMAC header is computed and appended to the outgoing response.

Build Status

Usage

For a complete example, please see the examples. This snippet highlights the critical pieces of using the hmac middleware.

extern crate iron_hmac;

// ...

// The bodyparser middleware is required for hmac computation
chain.link_before(Read::<bodyparser::MaxBodyLength>::one(MAX_BODY_LENGTH));

// Build the hmac middleware
let (hmac_before, hmac_after) =
    iron_hmac::Hmac256Authentication::middleware(secret, header_key);

// ...

chain.link_before(hmac_before);

// ...

chain.link_after(hmac_after);