pub fn auth<S: BuildHasher>(
        &self,
        method: &Method,
        base_url: &str,
        params: &HashMap<&str, &str, S>,
    ) -> String {
        let nonce_string: String = thread_rng().sample_iter(Alphanumeric).take(32).collect();
        let oauth_header = OAuthHeader {
            credentials: self,
            nonce: nonce_string.as_str(),
            signature_method: "HMAC-SHA1",
            timestamp: current_timestamp(),
            version: "1.0",
            method,
            base_url,
            params,
        };
        oauth_header.to_string()
    }
/// Returns the OAuth Protocol Parameters which will be used as the value
/// of the HTTP Authorization header.
Returns the OAuth Protocol Parameters which will be used as the value
of the HTTP Authorization header.
Returns the OAuth Protocol Parameters which will be used as the value of the HTTP Authorization header .
pub fn auth<S: BuildHasher>(
        &self,
        method: &Method,
        base_url: &str,
        params: &HashMap<&str, &str, S>,
    ) -> String {
        let nonce_string: String = thread_rng().sample_iter(Alphanumeric).take(32).collect();
        let oauth_header = OAuthHeader {
            credentials: self,
            nonce: nonce_string.as_str(),
            signature_method: "HMAC-SHA1",
            timestamp: current_timestamp(),
            version: "1.0",
            method,
            base_url,
            params,
        };
        oauth_header.to_string()
    }
pub fn auth < S : BuildHasher > ( & self , method : & Method , base_url : & str , params : & HashMap < & str , & str , S > , ) -> String { let nonce_string : String = thread_rng ( ) . sample_iter ( Alphanumeric ) . take ( 32 ) . collect ( ) ; let oauth_header = OAuthHeader { credentials : self , nonce : nonce_string . as_str ( ) , signature_method : " " , timestamp : current_timestamp ( ) , version : " " , method , base_url , params , } ; oauth_header . to_string ( ) }
Returns the OAuth Protocol Parameters which will be used as the value
of the HTTP Authorization header.
Returns the OAuth Protocol Parameters which will be used as the value of the HTTP Authorization header .
&self
method
&Method
base_url
&str
params
&HashMap<&str, &str, S>
&self
method
&Method
base_url
&str
params
&HashMap<&str, &str, S>