pub struct Credentials { /* private fields */ }Expand description
The values a user submitted to log in.
A map rather than a struct because the identifying field varies (email,
username, phone) and an application may authenticate on more than one
(email plus tenant_id).
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn password(
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn password( username: impl Into<String>, password: impl Into<String>, ) -> Self
The usual pair.
Sourcepub fn password_value(&self) -> Option<&str>
pub fn password_value(&self) -> Option<&str>
The submitted password.
Sourcepub fn lookup_fields(&self) -> Vec<(&str, &str)>
pub fn lookup_fields(&self) -> Vec<(&str, &str)>
Every field except password — what a provider looks a user up by.
The password is excluded because it is verified, never queried:
a WHERE password = ? against a hash column could never match, and
against a plaintext column would be a much worse bug.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§impl Debug for Credentials
impl Debug for Credentials
Source§impl Default for Credentials
impl Default for Credentials
impl Eq for Credentials
Source§impl PartialEq for Credentials
impl PartialEq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentials
impl UnwindSafe for Credentials
Blanket Implementations§
impl<T> Actor for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Event for T
impl<T> Event for T
Source§fn event_name() -> &'static strwhere
Self: Sized,
fn event_name() -> &'static strwhere
Self: Sized,
A human-readable name, used by wildcard listeners and log output.
Always the Rust type path; see the trait docs.