use thiserror::Error;
#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
#[non_exhaustive]
pub enum OAuthWorkflowError {
#[error("oauth binding failure")]
Binding,
#[error("oauth callback failure")]
Callback,
#[error("oauth flow expired")]
Expired,
#[error("oauth response too large")]
ResponseTooLarge,
#[error("oauth invalid json")]
InvalidJson,
#[error("oauth invalid url")]
InvalidUrl,
#[error("oauth invalid form")]
InvalidForm,
#[error("oauth resource metadata names another resource")]
ResourceMismatch,
#[error("oauth issuer mismatch")]
IssuerMismatch,
#[error("oauth server does not advertise PKCE S256")]
PkceUnsupported,
#[error("oauth metadata is missing")]
MissingMetadata,
}