Struct typed_headers::Credentials [−][src]
pub struct Credentials { /* fields omitted */ }Authentication credentials, as described in RFC7235.
Methods
impl Credentials[src]
impl Credentialspub fn from_auth_scheme(scheme: AuthScheme) -> Credentials[src]
pub fn from_auth_scheme(scheme: AuthScheme) -> CredentialsCreates credentials from just an auth-scheme.
pub fn from_token68(scheme: AuthScheme, token: Token68) -> Credentials[src]
pub fn from_token68(scheme: AuthScheme, token: Token68) -> CredentialsCreates credentials from an auth-scheme and token68 data.
pub fn bearer(token: Token68) -> Credentials[src]
pub fn bearer(token: Token68) -> CredentialsCreates Bearer authentication credentials as described in RFC6750.
pub fn basic(user_id: &str, password: &str) -> Result<Credentials, Error>[src]
pub fn basic(user_id: &str, password: &str) -> Result<Credentials, Error>Creates Basic authentication credentials as described in [RFC7617].
pub fn scheme(&self) -> &AuthScheme[src]
pub fn scheme(&self) -> &AuthSchemeReturns the auth-scheme associated with the credentials.
pub fn token68(&self) -> Option<&Token68>[src]
pub fn token68(&self) -> Option<&Token68>Returns the token68 value associated with the credentials if present.
pub fn as_bearer(&self) -> Option<&Token68>[src]
pub fn as_bearer(&self) -> Option<&Token68>Returns the bearer token if this contains Bearer credentials.
Trait Implementations
impl Debug for Credentials[src]
impl Debug for Credentialsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Credentials[src]
impl Clone for Credentialsfn clone(&self) -> Credentials[src]
fn clone(&self) -> CredentialsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Credentials[src]
impl PartialEq for Credentialsfn eq(&self, other: &Credentials) -> bool[src]
fn eq(&self, other: &Credentials) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Credentials) -> bool[src]
fn ne(&self, other: &Credentials) -> boolThis method tests for !=.
impl Eq for Credentials[src]
impl Eq for Credentialsimpl Display for Credentials[src]
impl Display for Credentialsfn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl FromStr for Credentials[src]
impl FromStr for CredentialsAuto Trait Implementations
impl Send for Credentials
impl Send for Credentialsimpl Sync for Credentials
impl Sync for Credentials