[−][src]Struct typed_headers::Credentials
Authentication credentials, as described in RFC7235.
Methods
impl Credentials
[src]
pub fn from_auth_scheme(scheme: AuthScheme) -> Credentials
[src]
Creates credentials from just an auth-scheme.
pub fn from_token68(scheme: AuthScheme, token: Token68) -> Credentials
[src]
Creates credentials from an auth-scheme and token68 data.
pub fn bearer(token: Token68) -> Credentials
[src]
Creates Bearer authentication credentials as described in RFC6750.
pub fn basic(user_id: &str, password: &str) -> Result<Credentials, Error>
[src]
Creates Basic authentication credentials as described in [RFC7617].
pub fn scheme(&self) -> &AuthScheme
[src]
Returns the auth-scheme associated with the credentials.
pub fn token68(&self) -> Option<&Token68>
[src]
Returns the token68 value associated with the credentials if present.
pub fn as_bearer(&self) -> Option<&Token68>
[src]
Returns the bearer token if this contains Bearer credentials.
Trait Implementations
impl PartialEq<Credentials> for Credentials
[src]
fn eq(&self, other: &Credentials) -> bool
[src]
fn ne(&self, other: &Credentials) -> bool
[src]
impl Eq for Credentials
[src]
impl Clone for Credentials
[src]
fn clone(&self) -> Credentials
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Credentials
[src]
impl Debug for Credentials
[src]
impl FromStr for Credentials
[src]
Auto Trait Implementations
impl Send for Credentials
impl Sync for Credentials
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,