[][src]Struct http_sig::SigningConfig

pub struct SigningConfig { /* fields omitted */ }

The configuration used for signing HTTP requests.

Methods

impl SigningConfig[src]

pub fn new_default(key_id: &str, key: &[u8]) -> Self[src]

Creates a new signing configuration using the default signature algorithm, and the specified key ID and key.

pub fn new<SigAlg: HttpSignature>(key_id: &str, signature: SigAlg) -> Self[src]

Creates a new signing configuration using a custom signature algorithm, and the specified key ID.

pub fn key_id(&self) -> &str[src]

Returns the key ID.

pub fn digest(&self) -> &dyn HttpDigest[src]

Returns the HTTP digest algorithm.

pub fn with_digest<DigestAlg: HttpDigest>(self, digest: DigestAlg) -> Self[src]

Sets the HTTP digest algorithm.

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

Returns whether the digest will be automatically computed when not already present.

This is set to true by default.

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

Controls whether the digest will be automatically computed when not already present (in-place).

This is set to true by default.

pub fn with_compute_digest(self, compute_digest: bool) -> Self[src]

Controls whether the digest will be automatically computed when not already present.

This is set to true by default.

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

Returns whether the current date and time will be added to the request when not already present.

This is set to true by default.

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

Controls whether the current date and time will be added to the request when not already present (in-place).

This is set to true by default.

pub fn with_add_date(self, add_date: bool) -> Self[src]

Controls whether the current date and time will be added to the request when not already present.

This is set to true by default.

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

Returns whether the host will be added to the request when not already present.

This is set to true by default.

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

Controls whether the host will be added to the request when not already present (in-place).

This is set to true by default.

pub fn with_add_host(self, add_host: bool) -> Self[src]

Controls whether the host will be added to the request when not already present.

This is set to true by default.

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

Returns the list of headers to include in the signature. Headers in this list which are not present in the request itself will be skipped when signing the request.

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

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

Controls the list of headers to include in the signature (in-place). Headers in this list which are not present in the request itself will be skipped when signing the request.

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

pub fn with_headers(self, headers: &[Header]) -> Self[src]

Controls the list of headers to include in the signature. Headers in this list which are not present in the request itself will be skipped when signing the request.

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

Trait Implementations

impl Clone for SigningConfig[src]

impl Debug for SigningConfig[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> 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.