pub enum SigV4Error {
RequestTimeTooSkewed {
signed: DateTime<Utc>,
server: DateTime<Utc>,
},
Malformed(&'static str),
SignatureMismatch,
InvalidDate(&'static str),
PresignedUrlExpired {
signed: DateTime<Utc>,
server: DateTime<Utc>,
expires_secs: i64,
},
InvalidPresignExpires(i64),
}Expand description
Reasons a SigV4 verification can fail. Each variant maps onto the AWS-shape error the caller should return.
Variants§
RequestTimeTooSkewed
Request was signed more than 15 minutes from the server’s clock.
Maps to AWS RequestTimeTooSkewed.
Malformed(&'static str)
Authorization header or presigned URL was not a well-formed
AWS4-HMAC-SHA256 signature. Maps to AWS IncompleteSignature or
InvalidSignatureException.
SignatureMismatch
The computed signature did not match the signature the client sent.
Maps to AWS SignatureDoesNotMatch.
InvalidDate(&'static str)
X-Amz-Date / credential-scope date could not be parsed.
PresignedUrlExpired
Presigned URL is past its X-Amz-Expires lifetime. Maps to AWS
AccessDenied (“Request has expired”).
InvalidPresignExpires(i64)
Presigned X-Amz-Expires was absent or outside the 1..=604800 range.
Trait Implementations§
Source§impl Debug for SigV4Error
impl Debug for SigV4Error
Source§impl Display for SigV4Error
impl Display for SigV4Error
Source§impl Error for SigV4Error
impl Error for SigV4Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SigV4Error
impl RefUnwindSafe for SigV4Error
impl Send for SigV4Error
impl Sync for SigV4Error
impl Unpin for SigV4Error
impl UnsafeUnpin for SigV4Error
impl UnwindSafe for SigV4Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more