pub enum SignatureError {
Show 17 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,
},
}
Expand description
Error returned when an attempt at validating an AWS SigV4 signature fails.
Variants
IO(IOError)
Validation failed due to an underlying I/O error.
InvalidBodyEncoding
Fields
message: String
The request body used an unsupported character set encoding. Currently only UTF-8 is supported.
InvalidCredential
Fields
message: String
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.
InvalidSecretKey
The secret key contains invalid bytes.
InvalidSignature
Fields
message: String
The signature passed in the request did not match the calculated signature value.
InvalidSigningKeyKind
Fields
message: String
The type of signing key is incorrect for this operation.
InvalidURIPath
Fields
message: String
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
).
MalformedHeader
Fields
message: String
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).
MalformedParameter
Fields
message: String
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).
MalformedSignature
Fields
message: String
The AWS SigV4 signature was malformed in some way. This can include invalid timestamp formats, missing authorization components, or unparseable components.
MissingHeader
Fields
header: String
A required HTTP header (and its equivalent in the query string) is missing.
MissingParameter
Fields
parameter: String
A required query parameter is missing. This is used internally in the library; external callers only see
MissingHeader
.
MultipleHeaderValues
Fields
header: String
An HTTP header that can be specified only once was specified multiple times.
MultipleParameterValues
Fields
parameter: String
A query parameter that can be specified only once was specified multiple times.
TimestampOutOfRange
The timestamp in the request is out of the allowed range.
UnknownAccessKey
Fields
access_key: String
The access key specified in the request is unknown.
UnknownSignatureAlgorithm
Fields
algorithm: String
The signature algorithm requested by the caller is unknown. This library only supports the AWS4-HMAC-SHA256
algorithm.
Trait Implementations
sourceimpl Debug for SignatureError
impl Debug for SignatureError
sourceimpl Display for SignatureError
impl Display for SignatureError
sourceimpl Error for SignatureError
impl Error for SignatureError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for SignatureError
impl From<Error> for SignatureError
sourcefn from(e: IOError) -> SignatureError
fn from(e: IOError) -> SignatureError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl !UnwindSafe for SignatureError
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