pub trait SignedMessage {
// Required method
fn lookup_component(&self, name: &CoveredComponent) -> Vec<String>;
}Expand description
Trait that messages seeking verification should implement to facilitate looking up raw values from the underlying message.
Required Methods§
Sourcefn lookup_component(&self, name: &CoveredComponent) -> Vec<String>
fn lookup_component(&self, name: &CoveredComponent) -> Vec<String>
Retrieve the raw value(s) of a covered component. Implementations should
respect any parameter values set on the covered component per the message
signature spec. Component values that cannot be found must return an empty vector.
CoveredComponent::HTTP fields are guaranteed to have lowercase ASCII names, so
care should be taken to ensure HTTP field names in the message are checked in a
case-insensitive way. Only CoveredComponent::Http should return a vector with
more than one element.
This function is also used to look up the values of Signature-Input, Signature
and (if used for web bot auth) Signature-Agent as standard HTTP headers.
Implementations should return those headers as well.