summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-10-20 14:21:21 -0700
committerBryan Newbold <bnewbold@archive.org>2022-10-20 14:21:21 -0700
commit402b8e27c8c39ef856ffc583799072ed70cdb0a6 (patch)
treedaf9beba69c4e405a12a88c4122ee056b5ba91f0
parent26a64b964d74cf78872893209ee0bd76a67c4176 (diff)
downloadfatcat-cli-402b8e27c8c39ef856ffc583799072ed70cdb0a6.tar.gz
fatcat-cli-402b8e27c8c39ef856ffc583799072ed70cdb0a6.zip
we don't actually verify macaroons, so remove verifier
-rw-r--r--fatcat-cli/src/lib.rs4
1 files changed, 1 insertions, 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<String> {
.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<String> = 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<String> {
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)
}