Extract account_id (URI) from ACME credentials JSON
(credentials_json: &str)
| 508 | |
| 509 | /// Extract account_id (URI) from ACME credentials JSON |
| 510 | fn extract_account_uri(credentials_json: &str) -> Option<String> { |
| 511 | #[derive(serde::Deserialize)] |
| 512 | struct Creds { |
| 513 | #[serde(default)] |
| 514 | account_id: String, |
| 515 | } |
| 516 | serde_json::from_str::<Creds>(credentials_json) |
| 517 | .ok() |
| 518 | .filter(|c| !c.account_id.is_empty()) |
| 519 | .map(|c| c.account_id) |
| 520 | } |
no test coverage detected