pub struct KeyPair {
pub key: Cow<'static, str>,
pub secret: Cow<'static, str>,
}
Expand description
A key/secret pair representing the app that is sending a request or an authorization from a user.
This type is used as part of the authentication process and to sign API requests afterward. For
the most part it’s used internally as part of a Token
, but at the very beginning of the
authentication process, you’ll need to manually create one to hold onto your “consumer token”
and request a request token.
For more information, see the authentication documentation.
Example
let con_token = egg_mode::KeyPair::new("consumer key", "consumer token");
Fields§
§key: Cow<'static, str>
A key used to identify an application or user.
secret: Cow<'static, str>
A private key used to sign messages from an application or user.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for KeyPair
impl<'de> Deserialize<'de> for KeyPair
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more