Trait Signer
pub trait Signer {
type Signature: AsRef<[u8]>;
type Error: Into<Box<dyn Error + Sync + Send>>;
// Required methods
fn set_headers(
&self,
protected_headers: &mut Headers,
unprotected_headers: &mut Headers,
) -> Result<(), Self::Error>;
fn sign(&self, data: &str) -> Result<Self::Signature, Self::Error>;
}
Expand description
Signer
implements all methods which are needed to sign our JWS requests,
and add the needed info to our JOSE headers (JOSE headers = protected + unprotected headers)