Struct object_store::aws::AwsAuthorizer
source · pub struct AwsAuthorizer<'a> { /* private fields */ }
Expand description
Authorize a Request
with an AwsCredential
using AWS SigV4
Implementations§
source§impl<'a> AwsAuthorizer<'a>
impl<'a> AwsAuthorizer<'a>
sourcepub fn new(
credential: &'a AwsCredential,
service: &'a str,
region: &'a str,
) -> Self
pub fn new( credential: &'a AwsCredential, service: &'a str, region: &'a str, ) -> Self
Create a new AwsAuthorizer
sourcepub fn with_sign_payload(self, signed: bool) -> Self
pub fn with_sign_payload(self, signed: bool) -> Self
Controls whether this AwsAuthorizer
will attempt to sign the request payload,
the default is true
Authorize request
with an optional pre-calculated SHA256 digest by attaching
the relevant AWS SigV4 headers
§Payload Signature
AWS SigV4 requests must contain the x-amz-content-sha256
header, it is set as follows:
- If not configured to sign payloads, it is set to
UNSIGNED-PAYLOAD
- If a
pre_calculated_digest
is provided, it is set to the hex encoding of it - If it is a streaming request, it is set to
STREAMING-AWS4-HMAC-SHA256-PAYLOAD
- Otherwise it is set to the hex encoded SHA256 of the request body
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for AwsAuthorizer<'a>
impl<'a> RefUnwindSafe for AwsAuthorizer<'a>
impl<'a> Send for AwsAuthorizer<'a>
impl<'a> Sync for AwsAuthorizer<'a>
impl<'a> Unpin for AwsAuthorizer<'a>
impl<'a> UnwindSafe for AwsAuthorizer<'a>
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