acme: align Authorization type with RFC structure
This commit is contained in:
parent
8433cd143f
commit
e4ef9955a3
|
@ -17,8 +17,8 @@ use types::{
|
||||||
KeyAuthorization, KeyOrKeyId, Problem, SigningAlgorithm,
|
KeyAuthorization, KeyOrKeyId, Problem, SigningAlgorithm,
|
||||||
};
|
};
|
||||||
pub use types::{
|
pub use types::{
|
||||||
Authorization, ChallengeType, Error, Identifier, LetsEncrypt, NewAccount, NewOrder, OrderState,
|
Authorization, AuthorizationStatus, ChallengeType, Error, Identifier, LetsEncrypt, NewAccount,
|
||||||
OrderStatus,
|
NewOrder, OrderState, OrderStatus,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct Order {
|
pub struct Order {
|
||||||
|
|
17
src/types.rs
17
src/types.rs
|
@ -213,12 +213,17 @@ pub(crate) struct JoseJson {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(tag = "status", rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub enum Authorization {
|
pub struct Authorization {
|
||||||
Pending {
|
pub identifier: Identifier,
|
||||||
identifier: Identifier,
|
pub status: AuthorizationStatus,
|
||||||
challenges: Vec<Challenge>,
|
pub challenges: Vec<Challenge>,
|
||||||
},
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub enum AuthorizationStatus {
|
||||||
|
Pending,
|
||||||
Valid,
|
Valid,
|
||||||
Invalid,
|
Invalid,
|
||||||
Revoked,
|
Revoked,
|
||||||
|
|
Loading…
Reference in New Issue