pub trait UnsignedMessage {
// Required methods
fn fetch_components_to_cover(&self) -> IndexMap<CoveredComponent, String>;
fn register_header_contents(
&mut self,
signature_input: String,
signature_header: String,
);
}
Expand description
Trait that messages seeking signing should implement to generate Signature-Input
and Signature
header contents.
Required Methods§
Sourcefn fetch_components_to_cover(&self) -> IndexMap<CoveredComponent, String>
fn fetch_components_to_cover(&self) -> IndexMap<CoveredComponent, String>
Obtain a list of covered components to be included. HTTP fields must be lowercased before
emitting. It is NOT RECOMMENDED to include signature
and signature-input
fields here.
If signing a Web Bot Auth message, and Signature-Agent
header is intended present, you MUST
include it as a component here for successful verification.
Sourcefn register_header_contents(
&mut self,
signature_input: String,
signature_header: String,
)
fn register_header_contents( &mut self, signature_input: String, signature_header: String, )
Store the contents of a generated Signature-Input
and Signature
header value.
It is the responsibility of the application to generate a consistent label for both.
signature_header
is guaranteed to be a sfv
byte sequence element. signature_input
is guaranteed to be sfv
inner list of strings.