SignRequest

Trait SignRequest 

Source
pub trait SignRequest:
    Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    type Credential: Send + Sync + Unpin + 'static;

    // Required method
    fn sign_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        req: &'life2 mut Parts,
        credential: Option<&'life3 Self::Credential>,
        expires_in: Option<Duration>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

SignRequest is the trait used by signer to build the signing request.

Required Associated Types§

Source

type Credential: Send + Sync + Unpin + 'static

Credential used by this builder.

Typically, it will be a credential.

Required Methods§

Source

fn sign_request<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 Context, req: &'life2 mut Parts, credential: Option<&'life3 Self::Credential>, expires_in: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Construct the signing request.

§Credential

The credential parameter is the credential required by the signer to sign the request.

§Expires In

The expires_in parameter specifies the expiration time for the result. If the signer does not support expiration, it should return an error.

Implementation details determine how to handle the expiration logic. For instance, AWS uses a query string that includes an Expires parameter.

Implementors§