Trait Signer
Source pub trait Signer: Send + Sync {
// Required methods
fn algorithm(&self) -> SigningAlgorithm;
fn key_id(&self) -> &str;
fn public_key_jwk(&self) -> Result<Jwk>;
fn sign(&self, payload: &[u8]) -> Result<SignatureEnvelope>;
// Provided methods
fn verify(&self, payload: &[u8], signature: &[u8]) -> Result<bool> { ... }
fn verify_via_backend(
&self,
_payload: &[u8],
_signature: &[u8],
) -> Result<bool> { ... }
fn sign_json(&self, value: &Value) -> Result<SignatureEnvelope> { ... }
}