Crate oauthcli [−] [src]
Yet Another OAuth 1.0 Client Library for Rust
Examples
Basic sample:
use oauthcli::*; let url = url::Url::parse("http://example.com/").unwrap(); let header = OAuthAuthorizationHeaderBuilder::new( "GET", &url, "consumer", "secret", SignatureMethod::HmacSha1) .token("token", "secret") .finish();
If you use for Twitter, because of Twitter's bug, use finish_for_twitter method, and make sure to encode the request body with OAUTH_ENCODE_SET. For more detail, see this article (Japanese).
Structs
| OAUTH_ENCODE_SET | |
| OAuthAuthorizationHeader |
|
| OAuthAuthorizationHeaderBuilder |
Enums
| ParseOAuthAuthorizationHeaderError | |
| SignatureMethod | Available |
Functions
| authorization_header | [Deprecated] Generate |
| nonce | Generate a string for |
| timestamp | [Deprecated] Generate a string for |