pub struct SigV4Authenticator { /* private fields */ }
Expand description
Low-level structure for performing AWS SigV4 authentication after a canonical request has been generated.
Implementations§
source§impl SigV4Authenticator
impl SigV4Authenticator
sourcepub fn builder() -> SigV4AuthenticatorBuilder
pub fn builder() -> SigV4AuthenticatorBuilder
Create a builder for SigV4Authenticator
.
sourcepub fn canonical_request_sha256(&self) -> [u8; 32]
pub fn canonical_request_sha256(&self) -> [u8; 32]
Retrieve the SHA-256 hash of the canonical request.
sourcepub fn credential(&self) -> &str
pub fn credential(&self) -> &str
Retrieve the credential passed into the request, in the form of keyid/date/region/service/aws4_request
.
sourcepub fn session_token(&self) -> Option<&str>
pub fn session_token(&self) -> Option<&str>
Retrieve the optional session token.
sourcepub fn request_timestamp(&self) -> DateTime<Utc>
pub fn request_timestamp(&self) -> DateTime<Utc>
Retrieve the timestamp of the request.
sourcepub async fn validate_signature<S, F>(
&self,
region: &str,
service: &str,
server_timestamp: DateTime<Utc>,
allowed_mismatch: Duration,
get_signing_key: &mut S
) -> Result<SigV4AuthenticatorResponse, SignatureError>where
S: Service<GetSigningKeyRequest, Response = GetSigningKeyResponse, Error = BoxError, Future = F> + Send,
F: Future<Output = Result<GetSigningKeyResponse, BoxError>> + Send,
pub async fn validate_signature<S, F>(
&self,
region: &str,
service: &str,
server_timestamp: DateTime<Utc>,
allowed_mismatch: Duration,
get_signing_key: &mut S
) -> Result<SigV4AuthenticatorResponse, SignatureError>where
S: Service<GetSigningKeyRequest, Response = GetSigningKeyResponse, Error = BoxError, Future = F> + Send,
F: Future<Output = Result<GetSigningKeyResponse, BoxError>> + Send,
Validate the request signature.
Trait Implementations§
source§impl Clone for SigV4Authenticator
impl Clone for SigV4Authenticator
source§fn clone(&self) -> SigV4Authenticator
fn clone(&self) -> SigV4Authenticator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SigV4Authenticator
impl Debug for SigV4Authenticator
source§impl Default for SigV4Authenticator
impl Default for SigV4Authenticator
source§fn default() -> SigV4Authenticator
fn default() -> SigV4Authenticator
Returns the “default value” for a type. Read more