#[non_exhaustive]pub enum Verified {
Cavage(CavageVerified),
Rfc9421(Rfc9421Verified),
}Expand description
Report summarising a successful verification.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Cavage(CavageVerified)
The request was signed using the Cavage draft-12 flavour.
Rfc9421(Rfc9421Verified)
The request was signed using RFC 9421.
Implementations§
Source§impl Verified
impl Verified
Sourcepub fn signature_base(&self) -> &str
pub fn signature_base(&self) -> &str
Returns the signature base string that was verified, for audit logging and troubleshooting.
Security note. The signature base contains the literal
value of every header that participated in the signature,
including anything sensitive the signer accidentally covered
(typically nothing on ActivityPub, but defence-in-depth still
matters). Prefer Self::signature_base_redacted for any
log line that might be captured by a third party.
Sourcepub fn signature_base_redacted(&self, sensitive_headers: &[&str]) -> String
pub fn signature_base_redacted(&self, sensitive_headers: &[&str]) -> String
Returns the signature base string with the values of any header
named in sensitive_headers replaced by <redacted>.
The headers are matched case-insensitively against the line
prefix that build_signature_base /
build_signature_base emit; entries not
present in the signature base pass through unchanged.
Pass REDACTED_HEADERS_DEFAULT to match the header set this
crate considers sensitive by default.