diff --git a/src/cmd_signjwtse.rs b/src/cmd_signjwtse.rs index 1d9f27c..04683dd 100644 --- a/src/cmd_signjwtse.rs +++ b/src/cmd_signjwtse.rs @@ -10,8 +10,8 @@ use std::collections::BTreeMap; use crate::cmd_signjwt::{build_jwt_parts, merge_header_claims, merge_payload_claims}; use crate::ecdsautil::parse_ecdsa_to_rs; -use crate::{hmacutil, util}; use crate::keyutil::{parse_key_uri, KeyUri}; +use crate::{hmacutil, util}; const SEPARATOR: &str = "."; @@ -24,7 +24,7 @@ impl Command for CommandImpl { fn subcommand<'a>(&self) -> App<'a, 'a> { SubCommand::with_name(self.name()).about("Sign JWT subcommand") - .arg(Arg::with_name("private-key").short("k").long("private-key").takes_value(true).help("Private key representation")) + .arg(Arg::with_name("key").long("key").required(true).takes_value(true).help("Key uri")) .arg(Arg::with_name("key-id").short("K").long("key-id").takes_value(true).help("Header key ID")) .arg(Arg::with_name("claims").short("C").long("claims").takes_value(true).multiple(true).help("Claims, key:value")) .arg(Arg::with_name("payload").short("P").long("payload").takes_value(true).help("Claims in JSON")) @@ -42,7 +42,7 @@ impl Command for CommandImpl { let mut json = BTreeMap::<&'_ str, String>::new(); let private_key = opt_value_result!( - sub_arg_matches.value_of("private-key"), + sub_arg_matches.value_of("key"), "Private key PKCS#8 DER base64 encoded or PEM" ); let private_key = hmacutil::try_hmac_decrypt_to_string(private_key)?;