pub enum AuthRequestType<'a> {
AuthorizationHeader((&'a Request, &'a str, DateTime<Utc>)),
QueryParams((&'a Request, &'a str, DateTime<Utc>)),
PostRequest(&'a Policy),
}
Expand description
Authentication Type of Request.
Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
Variants
AuthorizationHeader((&'a Request, &'a str, DateTime<Utc>))
Use Authorization Header in Request. The famous authentication type of AWS S3 Rest APIs
Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html
QueryParams((&'a Request, &'a str, DateTime<Utc>))
Use Query Params. This authentication type can support delegating the download permisison of an object for client
Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
PostRequest(&'a Policy)
Post Requests. This authentication type support delegating the upload permission of an object to client
Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html
Implementations
sourceimpl<'a> AuthRequestType<'a>
impl<'a> AuthRequestType<'a>
pub fn new_query_param_presigned(
req: &'a Request,
region: &'a str,
date: DateTime<Utc>
) -> Self
pub fn new_post_presigned(policy: &'a Policy) -> Self
pub fn string_to_sign(self) -> String
Trait Implementations
sourceimpl<'a> Clone for AuthRequestType<'a>
impl<'a> Clone for AuthRequestType<'a>
sourcefn clone(&self) -> AuthRequestType<'a>
fn clone(&self) -> AuthRequestType<'a>
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 more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for AuthRequestType<'a>
impl<'a> Send for AuthRequestType<'a>
impl<'a> Sync for AuthRequestType<'a>
impl<'a> Unpin for AuthRequestType<'a>
impl<'a> !UnwindSafe for AuthRequestType<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more