[][src]Struct http_sig::VerifyingConfig

pub struct VerifyingConfig { /* fields omitted */ }

The configuration used for verifying HTTP requests.

Methods

impl VerifyingConfig[src]

pub fn new<KP: KeyProvider>(key_provider: KP) -> Self[src]

Creates a new verifying configuration using the given key provider.

pub fn key_provider(&self) -> &dyn KeyProvider[src]

Returns the key provider.

pub fn digest_provider(&self) -> &dyn DigestProvider[src]

Returns the digest provider.

pub fn with_digest<DP: DigestProvider>(self, digest_provider: DP) -> Self[src]

Sets the digest provider.

pub fn require_digest(&self) -> bool[src]

Returns whether a digest header must be present and included in the signature for requests with a body.

This is set to true by default.

pub fn set_require_digest(&mut self, require_digest: bool) -> &mut Self[src]

Controls whether a digest header must be present and included in the signature for requests with a body (in-place).

This is set to true by default.

pub fn with_require_digest(self, require_digest: bool) -> Self[src]

Controls whether a digest header must be present and included in the signature for requests with a body.

This is set to true by default.

pub fn validate_digest(&self) -> bool[src]

Returns whether the request body will be checked against the digest for correctness if the digest is included in the signature.

This is set to true by default.

pub fn set_validate_digest(&mut self, validate_digest: bool) -> &mut Self[src]

Controls whether the request body will be checked against the digest for correctness if the digest is included in the signature (in-place).

This is set to true by default.

pub fn with_validate_digest(self, validate_digest: bool) -> Self[src]

Controls whether the request body will be checked against the digest for correctness if the digest is included in the signature.

This is set to true by default.

pub fn validate_date(&self) -> bool[src]

Returns whether the date header will be compared against the current date and time if the date header is included in the signature.

This is set to true by default.

pub fn set_validate_date(&mut self, validate_date: bool) -> &mut Self[src]

Controls whether the date header will be compared against the current date and time if the date header is included in the signature (in-place).

This is set to true by default.

pub fn with_validate_date(self, validate_date: bool) -> Self[src]

Controls whether the date header will be compared against the current date and time if the date header is included in the signature.

This is set to true by default.

pub fn date_leeway(&self) -> Duration[src]

Returns the amount of leeway allowed in either direction when comparing dates and times from requests against the current date and time.

This is set to 30 seconds by default.

pub fn set_date_leeway(&mut self, date_leeway: Duration) -> &mut Self[src]

Controls the amount of leeway allowed in either direction when comparing dates and times from requests against the current date and time (in-place).

This is set to 30 seconds by default.

pub fn with_date_leeway(self, date_leeway: Duration) -> Self[src]

Controls the amount of leeway allowed in either direction when comparing dates and times from requests against the current date and time.

This is set to 30 seconds by default.

pub fn required_headers(&self) -> impl IntoIterator<Item = &Header>[src]

Returns the list of headers that must be included in every request's signature. Do not include the digest header here or requests without a body will be denied. Instead, rely on the validate_digest option.

This list contains (request-target) and date by default.

pub fn set_required_headers(&mut self, required_headers: &[Header]) -> &mut Self[src]

Controls the list of headers that must be included in every request's signature (in-place). Do not include the digest header here or requests without a body will be denied. Instead, rely on the validate_digest option.

This list contains (request-target) and date by default.

pub fn with_required_headers(self, required_headers: &[Header]) -> Self[src]

Controls the list of headers that must be included in every request's signature. Do not include the digest header here or requests without a body will be denied. Instead, rely on the validate_digest option.

This list contains (request-target) and date by default.

Trait Implementations

impl Debug for VerifyingConfig[src]

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> Same<T> for T

type Output = T

Should always be Self

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.