Expand description
Generate OAuth 1.0 Authorization headers.
§Example
use oauth1_header::http::Method;
use oauth1_header::Credentials;
use std::collections::HashMap;
let mut params = HashMap::new();
params.insert("foo", "bar");
let credentials = Credentials::new(
"some-consumer-key",
"some-consumer-secret",
"some-token",
"some-token-secret",
);
let header_value = credentials.auth(&Method::GET, "https://example.com", ¶ms);
Where header_value
will contain the OAuth Protocol Parameters
ready to be sent in the HTTP Authorization header.
Re-exports§
pub use http;
Structs§
- The consumer key, consumer secret, token and token secret used in OAuth 1.0.