use thiserror::Error;
#[derive(Debug, Error)]
pub enum FederationError {
#[error("OIDC token invalid: {0}")]
TokenInvalid(String),
#[error("token is missing the nonce claim")]
NonceMissing,
#[error("token nonce does not match the expected challenge nonce")]
NonceMismatch,
#[error("token is missing the issuer (iss) claim")]
IssuerMissing,
#[error("attested claim not supported by the token: {0}")]
ClaimNotInToken(String),
#[error("invalid identifier: {0}")]
InvalidId(String),
#[error("invalid subject DID: {0}")]
InvalidSubject(String),
#[error("failed to anchor attestation into subject KEL: {0}")]
AnchorFailed(String),
}