diff --git a/src/main.rs b/src/main.rs index b46ef40..a812d42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,8 +90,10 @@ fn run() -> Result<(), anyhow::Error> { AuthnAction::List => output!(args, &hosts)?, AuthnAction::Get { host, token_only } => match hosts.get(&host) { Some(h) => match token_only { - #[allow(deprecated)] - true => print!("{}", h.oauth_token), + true => match hosts.retrieve_token(&host)? { + Some(t) => print!("{}", t), + _ => return Err(anyhow!("Token was not found for the host.")), + }, _ => output!(args, &h)?, }, _ => Err(anyhow!(