[][src]Struct oauth_1a::OAuthData

pub struct OAuthData {
    pub client_id: ClientId,
    pub token: Option<Token>,
    pub signature_method: SignatureMethod,
    pub nonce: Nonce,
}

The main entrypoint to the API. Non-sensitive data required for all authenticated requests.

Fields

client_id: ClientId

The client ID.

token: Option<Token>

The OAuth token.

signature_method: SignatureMethod

The signature method.

nonce: Nonce

The nonce.

Implementations

impl OAuthData[src]

#[must_use]pub fn authorization(
    &self,
    req: SignableRequest,
    typ: AuthorizationType,
    key: &SigningKey
) -> String
[src]

Generate an HTTP Authorization header.

#[must_use]pub fn parameters(&self) -> BTreeMap<String, String>[src]

Get the OAuth parameters.

pub fn regen_nonce(&mut self)[src]

Regenerate the nonce. This should be done at least between each identical request made within a second.

Trait Implementations

impl Debug for OAuthData[src]

impl<'de> Deserialize<'de> for OAuthData[src]

impl Eq for OAuthData[src]

impl Hash for OAuthData[src]

impl Ord for OAuthData[src]

impl PartialEq<OAuthData> for OAuthData[src]

impl PartialOrd<OAuthData> for OAuthData[src]

impl Serialize for OAuthData[src]

impl StructuralEq for OAuthData[src]

impl StructuralPartialEq for OAuthData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,