pub struct Authentication { /* private fields */ }
Expand description
HTTP signature using HMAC.
Implementations§
Source§impl Authentication
impl Authentication
Sourcepub fn set_service_name(&mut self, service_name: &str)
pub fn set_service_name(&mut self, service_name: &str)
Sets the service name.
Sourcepub fn set_access_key_id(&mut self, access_key_id: impl Into<AccessKeyId>)
pub fn set_access_key_id(&mut self, access_key_id: impl Into<AccessKeyId>)
Sets the access key ID.
Sourcepub fn set_signature(&mut self, signature: String)
pub fn set_signature(&mut self, signature: String)
Sets the signature.
Sourcepub fn set_accept(&mut self, accept: Option<String>)
pub fn set_accept(&mut self, accept: Option<String>)
Sets the accept
header value.
Sourcepub fn set_content_md5(&mut self, content_md5: String)
pub fn set_content_md5(&mut self, content_md5: String)
Sets the content-md5
header value.
Sourcepub fn set_content_type(&mut self, content_type: Option<String>)
pub fn set_content_type(&mut self, content_type: Option<String>)
Sets the content-type
header value.
Sourcepub fn set_date_header(&mut self, header_name: &'static str, date: DateTime)
pub fn set_date_header(&mut self, header_name: &'static str, date: DateTime)
Sets the header value for the date.
Sourcepub fn set_expires(&mut self, expires: Option<DateTime>)
pub fn set_expires(&mut self, expires: Option<DateTime>)
Sets the expires timestamp.
Sourcepub fn set_headers(
&mut self,
headers: impl Iterator<Item = (String, String)>,
filter: &[&'static str],
)
pub fn set_headers( &mut self, headers: impl Iterator<Item = (String, String)>, filter: &[&'static str], )
Sets the canonicalized headers. The header is matched if it has a prefix in the filter list.
Sourcepub fn set_resource(&mut self, path: String, query: Option<&Map>)
pub fn set_resource(&mut self, path: String, query: Option<&Map>)
Sets the canonicalized resource.
Sourcepub fn service_name(&self) -> &str
pub fn service_name(&self) -> &str
Returns the service name.
Sourcepub fn access_key_id(&self) -> &str
pub fn access_key_id(&self) -> &str
Returns the access key ID.
Returns an authorization
header value.
Sourcepub fn string_to_sign(&self) -> String
pub fn string_to_sign(&self) -> String
Returns the string to sign.
Sourcepub fn sign_with<H>(
&self,
secret_access_key: &SecretAccessKey,
) -> Result<String, Error>
pub fn sign_with<H>( &self, secret_access_key: &SecretAccessKey, ) -> Result<String, Error>
Generates a signature with the secret access key.
Sourcepub fn validate_with<H>(
&self,
secret_access_key: &SecretAccessKey,
) -> Validation
pub fn validate_with<H>( &self, secret_access_key: &SecretAccessKey, ) -> Validation
Validates the signature using the secret access key.
Auto Trait Implementations§
impl Freeze for Authentication
impl RefUnwindSafe for Authentication
impl Send for Authentication
impl Sync for Authentication
impl Unpin for Authentication
impl UnwindSafe for Authentication
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more