From 402b8e27c8c39ef856ffc583799072ed70cdb0a6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 20 Oct 2022 14:21:21 -0700 Subject: we don't actually verify macaroons, so remove verifier --- fatcat-cli/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fatcat-cli/src/lib.rs b/fatcat-cli/src/lib.rs index 17b3e0e..a4cf35f 100644 --- a/fatcat-cli/src/lib.rs +++ b/fatcat-cli/src/lib.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, Context, Result}; use data_encoding::BASE64; -use macaroon::{Caveat, Macaroon, Verifier}; +use macaroon::{Caveat, Macaroon}; use std::path::PathBuf; use std::str::FromStr; @@ -87,7 +87,6 @@ pub fn parse_macaroon_editor_id(s: &str) -> Result { .context("macaroon parsing failed")?; let mac = Macaroon::deserialize(&raw) .map_err(|err| anyhow!("macaroon deserialization failed: {:?}", err))?; - let mut verifier = Verifier::default(); let mut editor_id: Option = None; for caveat in mac.first_party_caveats() { if let Caveat::FirstParty(fp) = caveat { @@ -107,7 +106,6 @@ pub fn parse_macaroon_editor_id(s: &str) -> Result { Some(id) => id, None => return Err(anyhow!("expected an editor_id caveat in macaroon token")), }; - verifier.satisfy_exact(format!("editor_id = {}", editor_id).into()); Ok(editor_id) } -- cgit v1.2.3