Trait SignatureMethod

Source
pub trait SignatureMethod: Debug + DynClone {
    // Required methods
    fn name(&self) -> &'static str;
    fn sign(
        &self,
        base_string: &str,
        auth: &AuthenticationLevel,
    ) -> Result<Parameter, Box<dyn Error>>;

    // Provided method
    fn as_parameter(&self) -> Parameter { ... }
}
Expand description

The trait for signature methods

Required Methods§

Source

fn name(&self) -> &'static str

Returns the name of the method

For example HMAC-SHA1

Source

fn sign( &self, base_string: &str, auth: &AuthenticationLevel, ) -> Result<Parameter, Box<dyn Error>>

Attempts to sign the provided base string, and returns the oauth_signature parameter.

Provided Methods§

Source

fn as_parameter(&self) -> Parameter

Returns the oauth_signature_method parameter

Implementors§