forked from Proxmox/proxmox
proxmox-acme: add api-types feature
Because AccountData is exposed via our API (currently as type Object). Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
724c3dda6f
commit
619414d4f1
@ -19,6 +19,8 @@ openssl.workspace = true
|
|||||||
# For the client
|
# For the client
|
||||||
native-tls = { workspace = true, optional = true }
|
native-tls = { workspace = true, optional = true }
|
||||||
|
|
||||||
|
proxmox-schema = { workspace = true, optional = true, features = [ "api-macro", "api-types" ] }
|
||||||
|
|
||||||
[dependencies.ureq]
|
[dependencies.ureq]
|
||||||
optional = true
|
optional = true
|
||||||
version = "2.4"
|
version = "2.4"
|
||||||
@ -27,6 +29,7 @@ features = [ "native-tls", "gzip" ]
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
api-types = [ "dep:proxmox-schema" ]
|
||||||
client = ["ureq", "native-tls"]
|
client = ["ureq", "native-tls"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -279,6 +279,7 @@ impl CertificateRevocation<'_> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Status of an ACME account.
|
/// Status of an ACME account.
|
||||||
|
#[cfg_attr(feature="api-types", proxmox_schema::api())]
|
||||||
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Serialize)]
|
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub enum AccountStatus {
|
pub enum AccountStatus {
|
||||||
@ -309,6 +310,12 @@ impl AccountStatus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature="api-types", proxmox_schema::api(
|
||||||
|
properties: {
|
||||||
|
extra: { type: Object, properties: {}, additional_properties: true },
|
||||||
|
contact: { type: Array, items: { type: String, description: "Contact Info." }}
|
||||||
|
}
|
||||||
|
))]
|
||||||
/// ACME Account data. This is the part of the account returned from and possibly sent to the ACME
|
/// ACME Account data. This is the part of the account returned from and possibly sent to the ACME
|
||||||
/// provider. Some fields may be uptdated by the user via a request to the account location, others
|
/// provider. Some fields may be uptdated by the user via a request to the account location, others
|
||||||
/// may not be changed.
|
/// may not be changed.
|
||||||
|
@ -14,11 +14,16 @@ struct Protected {
|
|||||||
kid: String,
|
kid: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature="api-types", proxmox_schema::api())]
|
||||||
|
/// External Account Bindings
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ExternalAccountBinding {
|
pub struct ExternalAccountBinding {
|
||||||
|
/// JOSE Header (see RFC 7515)
|
||||||
protected: String,
|
protected: String,
|
||||||
|
/// Payload
|
||||||
payload: String,
|
payload: String,
|
||||||
|
/// HMAC signature
|
||||||
signature: String,
|
signature: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user