aws4_request
Types
pub type Signer {
Signer(
date_time: Option(DateTime),
access_key_id: String,
secret_access_key: String,
region: String,
service: String,
session_token: Option(String),
)
}
Constructors
-
Signer( date_time: Option(DateTime), access_key_id: String, secret_access_key: String, region: String, service: String, session_token: Option(String), )
Functions
pub fn sign_bits(
signer signer: Signer,
request request: Request(BitArray),
) -> Request(BitArray)
Sign a request that has a bit array body.
pub fn sign_string(
signer signer: Signer,
request request: Request(String),
) -> Request(BitArray)
Sign a request that has a string body.
pub fn signer(
access_key_id access_key_id: String,
secret_access_key secret_access_key: String,
region region: String,
service service: String,
) -> Signer
Create a new request signer for the given credentials, service, and region.
pub fn with_date_time(
signer: Signer,
date_time: #(#(Int, Int, Int), #(Int, Int, Int)),
) -> Signer
Set a specific time to use for request signing, overriding the default behaviour of using the current time.
pub fn with_region(signer: Signer, region: String) -> Signer
pub fn with_service(signer: Signer, service: String) -> Signer
pub fn with_session_token(
signer: Signer,
session_token: String,
) -> Signer
Set a session token when using temporary security credentials.
This sets the x-amz-security-token
header.