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,
|
||||
};
|
||||
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 {
|
||||
|
|
17
src/types.rs
17
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<Challenge>,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Authorization {
|
||||
pub identifier: Identifier,
|
||||
pub status: AuthorizationStatus,
|
||||
pub challenges: Vec<Challenge>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum AuthorizationStatus {
|
||||
Pending,
|
||||
Valid,
|
||||
Invalid,
|
||||
Revoked,
|
||||
|
|
Loading…
Reference in New Issue