pub type Result<T> = core::result::Result<T, Error>;
#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("failed to parse challenge: {0}")]
ChallengeParse(String),
#[error("failed to compute Authorization response: {0}")]
ResponseCompute(String),
#[error("signed-url key {kid:?} has a {actual}-byte secret, must be at least {min} bytes")]
SignedUrlKeyTooShort {
kid: String,
min: usize,
actual: usize,
},
#[error("signed-url keyset has no key with kid {0:?}")]
UnknownSignedUrlKeyId(String),
}