[−][src]Struct http_sig::SigningConfig
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]
fn clone(&self) -> SigningConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SigningConfig
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SigningConfig
impl Send for SigningConfig
impl Sync for SigningConfig
impl Unpin for SigningConfig
impl !UnwindSafe for SigningConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,