Print human-readable output.
(
&self,
info: &atomic_remote::IdentityInfo,
canonical: &str,
expected_did: &str,
)
| 152 | |
| 153 | /// Print human-readable output. |
| 154 | fn output_default( |
| 155 | &self, |
| 156 | info: &atomic_remote::IdentityInfo, |
| 157 | canonical: &str, |
| 158 | expected_did: &str, |
| 159 | ) { |
| 160 | print_section(&format!("Identity: {}", info.name)); |
| 161 | println!(); |
| 162 | |
| 163 | println!(" Server ID: {}", info.id); |
| 164 | println!(" Status: {}", info.status); |
| 165 | println!( |
| 166 | " Created: {}", |
| 167 | info.created_at.format("%Y-%m-%d %H:%M:%S UTC") |
| 168 | ); |
| 169 | println!(); |
| 170 | println!(" Public Key: {}", canonical); |
| 171 | println!(" did:atomic: {}", expected_did); |
| 172 | println!(); |
| 173 | |
| 174 | if let Some(server_key) = &info.public_key { |
| 175 | if server_key != canonical { |
| 176 | print_hint(&format!( |
| 177 | "Server returned a different canonical key ({}...) — verify you typed \ |
| 178 | the key correctly.", |
| 179 | short_key(server_key) |
| 180 | )); |
| 181 | } |
| 182 | } else { |
| 183 | print_hint("Server did not return a public key; it may not support by-key lookup yet."); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | /// Print JSON output. |
| 188 | fn output_json(&self, info: &atomic_remote::IdentityInfo, canonical: &str, expected_did: &str) { |
no test coverage detected