Enum scratchstack_aws_signature::SignatureError[][src]

pub enum SignatureError {
Show variants IO(IOError), InvalidBodyEncoding { message: String, }, InvalidCredential { message: String, }, InvalidSecretKey, InvalidSignature { message: String, }, InvalidSigningKeyKind { message: String, }, InvalidURIPath { message: String, }, MalformedHeader { message: String, }, MalformedParameter { message: String, }, MalformedSignature { message: String, }, MissingHeader { header: String, }, MissingParameter { parameter: String, }, MultipleHeaderValues { header: String, }, MultipleParameterValues { parameter: String, }, TimestampOutOfRange { minimum: DateTime<Utc>, maximum: DateTime<Utc>, received: DateTime<Utc>, }, UnknownAccessKey { access_key: String, }, UnknownSignatureAlgorithm { algorithm: String, },
}

Error returned when an attempt at validating an AWS SigV4 signature fails.

Variants

Validation failed due to an underlying I/O error.

InvalidBodyEncoding

The request body used an unsupported character set encoding. Currently only UTF-8 is supported.

Show fields

Fields of InvalidBodyEncoding

message: String
InvalidCredential

The request signature specified an invalid credential – either the access key was not specified, or the credential scope (in the form <code>_date_/_region_/_service_/aws4_request</code>) did not match the expected value for the server.

Show fields

Fields of InvalidCredential

message: String
InvalidSecretKey

The secret key contains invalid bytes.

InvalidSignature

The signature passed in the request did not match the calculated signature value.

Show fields

Fields of InvalidSignature

message: String
InvalidSigningKeyKind

The type of signing key is incorrect for this operation.

Show fields

Fields of InvalidSigningKeyKind

message: String
InvalidURIPath

The URI path includes invalid components. This can be a malformed hex encoding (e.g. %0J), a non-absolute URI path (foo/bar), or a URI path that attempts to navigate above the root (/x/../../../y).

Show fields

Fields of InvalidURIPath

message: String
MalformedHeader

An HTTP header was malformed – the value could not be decoded as UTF-8, or the header was empty and this is not allowed (e.g. the content-type header), or the header could not be parsed (e.g., the date header is not a valid date).

Show fields

Fields of MalformedHeader

message: String
MalformedParameter

A query parameter was malformed – the value could not be decoded as UTF-8, or the parameter was empty and this is not allowed (e.g. a signature parameter), or the parameter could not be parsed (e.g., the X-Amz-Date parameter is not a valid date).

Show fields

Fields of MalformedParameter

message: String
MalformedSignature

The AWS SigV4 signature was malformed in some way. This can include invalid timestamp formats, missing authorization components, or unparseable components.

Show fields

Fields of MalformedSignature

message: String
MissingHeader

A required HTTP header (and its equivalent in the query string) is missing.

Show fields

Fields of MissingHeader

header: String
MissingParameter

A required query parameter is missing. This is used internally in the library; external callers only see MissingHeader.

Show fields

Fields of MissingParameter

parameter: String
MultipleHeaderValues

An HTTP header that can be specified only once was specified multiple times.

Show fields

Fields of MultipleHeaderValues

header: String
MultipleParameterValues

A query parameter that can be specified only once was specified multiple times.

Show fields

Fields of MultipleParameterValues

parameter: String
TimestampOutOfRange

The timestamp in the request is out of the allowed range.

Show fields

Fields of TimestampOutOfRange

minimum: DateTime<Utc>maximum: DateTime<Utc>received: DateTime<Utc>
UnknownAccessKey

The access key specified in the request is unknown.

Show fields

Fields of UnknownAccessKey

access_key: String
UnknownSignatureAlgorithm

The signature algorithm requested by the caller is unknown. This library only supports the AWS4-HMAC-SHA256 algorithm.

Show fields

Fields of UnknownSignatureAlgorithm

algorithm: String

Trait Implementations

impl Debug for SignatureError[src]

impl Display for SignatureError[src]

impl Error for SignatureError[src]

impl From<Error> for SignatureError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.