pub struct WebBotAuthVerifier { /* private fields */ }Expand description
A verifier for Web Bot Auth messages specifically.
Implementations§
Source§impl WebBotAuthVerifier
impl WebBotAuthVerifier
Sourcepub fn parse(
message: &impl WebBotAuthSignedMessage,
algorithm: Option<Algorithm>,
) -> Result<Self, ImplementationError>
pub fn parse( message: &impl WebBotAuthSignedMessage, algorithm: Option<Algorithm>, ) -> Result<Self, ImplementationError>
Parse a message into a structure that is ready for verification against an
external key with a suitable algorithm. If alg is not set, a default will
be chosen from the alg parameter.
§Errors
Returns ImplementationErrors relevant to verifying and parsing.
Sourcepub fn verify(
self,
keyring: &KeyRing,
key_id: Option<Thumbprint>,
enforce_key_directory_lookup: bool,
) -> Result<SignatureTiming, ImplementationError>
pub fn verify( self, keyring: &KeyRing, key_id: Option<Thumbprint>, enforce_key_directory_lookup: bool, ) -> Result<SignatureTiming, ImplementationError>
Verify the messsage, consuming the verifier in the process.
If key_id is not supplied, a key ID to fetch the public key
from keyring will be sourced from the keyid parameter
within the message. If enforce_key_directory_lookup is set,
verification will attempt to follow the Signature-Agent header
to ingest the JWK from an external directory. Note: we currently
do not implement ingesting JWKs from an external directory.
§Errors
Returns ImplementationErrors relevant to verifying and parsing.
Sourcepub fn get_details(&self) -> ParameterDetails
pub fn get_details(&self) -> ParameterDetails
Retrieve the parsed ParameterDetails from the message. Useful for logging
information about the message.
Sourcepub fn possibly_insecure(&self) -> bool
pub fn possibly_insecure(&self) -> bool
Indicates whether or not the message has semantic errors that pose a security risk, such as whether or not the message is expired, the nonce is invalid, etc.
Trait Implementations§
Source§impl Clone for WebBotAuthVerifier
impl Clone for WebBotAuthVerifier
Source§fn clone(&self) -> WebBotAuthVerifier
fn clone(&self) -> WebBotAuthVerifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more