Struct oauthcli::OAuthAuthorizationHeaderBuilder
[−]
[src]
pub struct OAuthAuthorizationHeaderBuilder<'a> { // some fields omitted }
Methods
impl<'a> OAuthAuthorizationHeaderBuilder<'a>
[src]
fn new<M, C, S>(method: M, url: &'a Url, consumer_key: C, consumer_secret: S, signature_method: SignatureMethod) -> Self where M: Into<Cow<'a, str>>, C: Into<Cow<'a, str>>, S: Into<Cow<'a, str>>
fn request_parameters<K, V, P>(&mut self, parameters: P) -> &mut Self where K: Into<Cow<'a, str>>, V: Into<Cow<'a, str>>, P: IntoIterator<Item=(K, V)>
fn realm<T: Into<Cow<'a, str>>>(&mut self, realm: T) -> &mut Self
fn token<T, S>(&mut self, token: T, secret: S) -> &mut Self where T: Into<Cow<'a, str>>, S: Into<Cow<'a, str>>
fn timestamp(&mut self, timestamp: u64) -> &mut Self
Sets a custom timestamp.
If you don't call timestamp()
, it will use the current time.
fn nonce<T: Into<Cow<'a, str>>>(&mut self, nonce: T) -> &mut Self
Sets a custom nonce.
If you don't call nonce()
, it will use a random string.
fn callback<T: Into<Cow<'a, str>>>(&mut self, callback: T) -> &mut Self
fn verifier<T: Into<Cow<'a, str>>>(&mut self, verifier: T) -> &mut Self
fn include_version(&mut self, include_version: bool) -> &mut Self
Sets the value that indicates whether the builder includes "oauth_version"
parameter.
The default is true
.
fn finish(&self) -> OAuthAuthorizationHeader
Generate Authorization
header for OAuth.
Panics
This function will panic if url
is not valid for HTTP or HTTPS.
fn finish_for_twitter(&self) -> OAuthAuthorizationHeader
Generate Authorization
header for Twitter.
Panics
This function will panic if url
is not valid for HTTP or HTTPS.