diff --git a/src/lib.rs b/src/lib.rs index a295e35..35390d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,8 +17,8 @@ use types::{ KeyAuthorization, KeyOrKeyId, Problem, SigningAlgorithm, }; pub use types::{ - Authorization, ChallengeType, Error, Identifier, LetsEncrypt, NewAccount, NewOrder, OrderState, - OrderStatus, + Authorization, AuthorizationStatus, ChallengeType, Error, Identifier, LetsEncrypt, NewAccount, + NewOrder, OrderState, OrderStatus, }; pub struct Order { diff --git a/src/types.rs b/src/types.rs index aaeb798..3a24d07 100644 --- a/src/types.rs +++ b/src/types.rs @@ -213,12 +213,17 @@ pub(crate) struct JoseJson { } #[derive(Debug, Deserialize)] -#[serde(tag = "status", rename_all = "camelCase")] -pub enum Authorization { - Pending { - identifier: Identifier, - challenges: Vec, - }, +#[serde(rename_all = "camelCase")] +pub struct Authorization { + pub identifier: Identifier, + pub status: AuthorizationStatus, + pub challenges: Vec, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum AuthorizationStatus { + Pending, Valid, Invalid, Revoked,