Skip to content

Commit cfd4ddf

Browse files
committed
fix: rename test flags to align with previous changes
1 parent 243d65c commit cfd4ddf

13 files changed

Lines changed: 29 additions & 24 deletions

File tree

crates/auths-cli/src/commands/ci/rotate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub fn run_rotate(
189189
super::setup::humanize_duration(max_age_secs)
190190
);
191191
println!(
192-
"To revoke: auths device revoke --device-did {} --key {}",
192+
"To revoke: auths device revoke --device {} --key {}",
193193
device_did, identity_key_alias
194194
);
195195

crates/auths-cli/src/commands/ci/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ pub fn run_setup(
252252
);
253253
println!("To rotate: auths ci rotate");
254254
println!(
255-
"To revoke: auths device revoke --device-did {} --key {}",
255+
"To revoke: auths device revoke --device {} --key {}",
256256
device_did, identity_key_alias
257257
);
258258

crates/auths-cli/src/commands/device/authorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct DeviceEntry {
4141
about = "Manage which devices can sign with your identity.",
4242
after_help = "Examples:
4343
auths device list # List authorized devices
44-
auths device link --key identity-key --device-key device-key --device-did did:key:...
44+
auths device link --key identity-key --device-key device-key --device did:key:...
4545
# Authorize a new device
4646
auths device revoke # Revoke a device
4747
auths device extend # Extend device expiry

crates/auths-cli/src/commands/device/pair/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub(crate) fn handle_pairing_response(
323323
println!(" You can manually link this device using:");
324324
println!(
325325
" {}",
326-
style(format!("auths device link --device-did {} ...", device_did)).dim()
326+
style(format!("auths device link --device {} ...", device_did)).dim()
327327
);
328328
save_device_info(now, auths_dir, &response)?;
329329
}

crates/auths-cli/src/commands/device/pair/online.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub(crate) async fn handle_initiate_online(
142142
println!(" You can manually link this device using:");
143143
println!(
144144
" {}",
145-
style(format!("auths device link --device-did {} ...", device_did)).dim()
145+
style(format!("auths device link --device {} ...", device_did)).dim()
146146
);
147147
}
148148
}

crates/auths-cli/src/commands/device/verify_attestation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fn resolve_issuer_key(
243243
// The attestation itself doesn't contain the issuer's public key directly,
244244
// so we need it from --issuer-pk or the user needs to provide it
245245
anyhow::bail!(
246-
"Unknown identity '{}'. Provide --issuer-pk to trust on first use, \
246+
"Unknown identity '{}'. Provide --signer-key to trust on first use, \
247247
or add to .auths/roots.json for explicit trust.",
248248
did
249249
);
@@ -254,7 +254,7 @@ fn resolve_issuer_key(
254254
Options:\n \
255255
1. Add to .auths/roots.json in the repository\n \
256256
2. Pin manually: auths trust pin --did {} --key <hex>\n \
257-
3. Provide --issuer-pk <hex> to bypass trust resolution",
257+
3. Provide --signer-key <hex> to bypass trust resolution",
258258
did,
259259
did
260260
);

crates/auths-cli/src/commands/learn.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,10 @@ fn section_revoking_access() -> Result<()> {
520520
println!();
521521
println!(" To revoke a device:");
522522
println!();
523-
println!(" {}", "$ auths device revoke <device-did>".cyan());
523+
println!(
524+
" {}",
525+
"$ auths device revoke --device <did:key:z6Mk...>".cyan()
526+
);
524527
println!();
525528
println!(" This creates a revocation record that:");
526529
println!();

crates/auths-cli/src/commands/provision.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ pub fn handle_provision(
9999
out.print_success("Identity provisioned successfully.");
100100
out.println(&format!(
101101
" {}",
102-
out.key_value("Controller DID", &result.controller_did)
102+
out.key_value("Identity", &result.controller_did)
103103
));
104104
out.println(&format!(
105105
" {}",
106-
out.key_value("Key alias", &result.key_alias)
106+
out.key_value("Key name", &result.key_alias)
107107
));
108108
}
109109
}

crates/auths-cli/src/errors/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ pub fn explain(code: &str) -> Option<&'static str> {
837837
"# AUTHS-E5103\n\n**Crate:** `auths-sdk` \n**Type:** `DeviceError::AttestationError`\n\n## Message\n\nattestation error: {0}\n",
838838
),
839839
"AUTHS-E5105" => Some(
840-
"# AUTHS-E5105\n\n**Crate:** `auths-sdk` \n**Type:** `DeviceError::DeviceDidMismatch`\n\n## Message\n\ndevice DID mismatch: expected {expected}, got {actual}\n\n## Suggestion\n\nCheck that --device-did matches the key alias\n",
840+
"# AUTHS-E5105\n\n**Crate:** `auths-sdk` \n**Type:** `DeviceError::DeviceDidMismatch`\n\n## Message\n\ndevice DID mismatch: expected {expected}, got {actual}\n\n## Suggestion\n\nCheck that --device matches the key name\n",
841841
),
842842

843843
// --- auths-sdk (DeviceExtensionError) ---

crates/auths-cli/tests/cases/revocation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use super::helpers::TestEnv;
33
fn extract_device_did(init_output: &[u8]) -> Option<String> {
44
let stdout = String::from_utf8_lossy(init_output);
55
for line in stdout.lines() {
6-
if (line.contains("Device linked:") || line.contains("Device:"))
6+
if (line.contains("Device linked:")
7+
|| line.contains("Device:")
8+
|| line.contains("This device authorized:"))
79
&& let Some(did) = line.split_whitespace().find(|w| w.starts_with("did:key:"))
810
{
911
return Some(did.to_string());

0 commit comments

Comments
 (0)