pub struct SigV4Authenticator { /* private fields */ }
Expand description
Low-level structure for performing AWS SigV4 authentication after a canonical request has been generated.
Implementations
sourceimpl 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<Principal, 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<Principal, 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
sourceimpl Clone for SigV4Authenticator
impl Clone for SigV4Authenticator
sourcefn clone(&self) -> SigV4Authenticator
fn clone(&self) -> SigV4Authenticator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SigV4Authenticator
impl Debug for SigV4Authenticator
sourceimpl Default for SigV4Authenticator
impl Default for SigV4Authenticator
sourcefn default() -> SigV4Authenticator
fn default() -> SigV4Authenticator
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SigV4Authenticator
impl Send for SigV4Authenticator
impl Sync for SigV4Authenticator
impl Unpin for SigV4Authenticator
impl UnwindSafe for SigV4Authenticator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more