Struct sentry_types::Auth
source · pub struct Auth { /* private fields */ }
Expand description
Represents an auth header.
Implementations§
source§impl Auth
impl Auth
sourcepub fn from_pairs<'a, 'b, I: Iterator<Item = (Cow<'a, str>, Cow<'b, str>)>>(
pairs: I
) -> Result<Auth, AuthParseError>
pub fn from_pairs<'a, 'b, I: Iterator<Item = (Cow<'a, str>, Cow<'b, str>)>>(
pairs: I
) -> Result<Auth, AuthParseError>
Creates an auth header from key value pairs.
sourcepub fn from_querystring(qs: &[u8]) -> Result<Auth, AuthParseError>
pub fn from_querystring(qs: &[u8]) -> Result<Auth, AuthParseError>
Creates an auth header from a query string.
sourcepub fn public_key(&self) -> &str
pub fn public_key(&self) -> &str
Returns the public key
sourcepub fn secret_key(&self) -> Option<&str>
pub fn secret_key(&self) -> Option<&str>
Returns the client’s secret if it authenticated with a secret.
sourcepub fn is_public(&self) -> bool
pub fn is_public(&self) -> bool
Returns true if the authentication implies public auth (no secret)
sourcepub fn client_agent(&self) -> Option<&str>
pub fn client_agent(&self) -> Option<&str>
Returns the client’s agent
Trait Implementations§
source§impl<'de> Deserialize<'de> for Auth
impl<'de> Deserialize<'de> for Auth
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