Yet Another OAuth 1.0 Client Library for Rust
- RFC 5849 implementation
- Very few dependencies
extern crate oauthcli;
extern crate url;
let header =
oauthcli::authorization_header(
"POST",
url::Url::parse("https://example").unwrap(),
None, // Realm
"Consumer Key",
"Consumer Secret",
Some("OAuth Token"),
Some("OAuth Token Secret"),
oauthcli::SignatureMethod::HmacSha1, // or Plaintext
&oauthcli::timestamp()[],
&oauthcli::nonce()[],
None, // oauth_callback
None, // oauth_verifier
vec![("status".to_string(), "hello".to_string())].into_iter()
);
// header = "OAuth ......"