pub fn commit_signer_trailers(raw_commit: &str) -> Option<(String, String)>Expand description
Extract (root_did, device_did) from a commit’s Auths-Id / Auths-Device
trailers. Returns None when either trailer is absent (a commit not signed
by auths). Keys match case-insensitively; the last occurrence wins (git
trailer semantics). These are in-band claims that select which KELs to
replay — the proof is always the signature + the pinned-root check.
Args:
raw_commit: The raw git commit object (headers + message).
Usage:
use auths_verifier::commit_signer_trailers;
let commit = "tree abc\n\nfix\n\nAuths-Id: did:keri:Er\nAuths-Device: did:keri:Ed\n";
assert_eq!(
commit_signer_trailers(commit),
Some(("did:keri:Er".into(), "did:keri:Ed".into()))
);