[][src]Struct gotham_middleware_aws_sig_verify::AWSSigV4Verifier

pub struct AWSSigV4Verifier {
    pub signing_key_kind: SigningKeyKind,
    pub signing_key_fn: SigningKeyFn,
    pub allowed_mismatch: Option<Duration>,
    pub service: String,
    pub region: String,
}

AWSSigV4Verifier implements middleware for Gotham that implements the AWS SigV4 signing protocol.

Verifying the signature requires reading (and thus consuming) the body. Upon a successful signature verification, the hyper::Body object in the state is replaced with a new body that contains all of the bytes read.

Fields

signing_key_kind: SigningKeyKindsigning_key_fn: SigningKeyFnallowed_mismatch: Option<Duration>service: Stringregion: String

Implementations

impl AWSSigV4Verifier[src]

pub fn new(signing_key_fn: SigningKeyFn, service: &str, region: &str) -> Self[src]

The new method creates a AWSSigV4Verifier with preferred defaults for signing_key_kind (KSigning) and allowed_mismatch (5 minutes).

Trait Implementations

impl Clone for AWSSigV4Verifier[src]

impl Middleware for AWSSigV4Verifier[src]

impl NewMiddleware for AWSSigV4Verifier[src]

type Instance = Self

The type of Middleware created by the NewMiddleware.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.