pub struct UserPassAuth;Implementations§
Source§impl UserPassAuth
impl UserPassAuth
pub fn new() -> Self
pub fn hash_password(password: &str) -> AuthResult<String>
pub async fn user_exists( storage: &dyn StorageBackend, username: &str, ) -> AuthResult<bool>
pub async fn create_user( storage: &dyn StorageBackend, username: &str, password: &str, policies: Vec<String>, ) -> AuthResult<()>
Trait Implementations§
Source§impl AuthMethod for UserPassAuth
impl AuthMethod for UserPassAuth
fn login<'life0, 'life1, 'async_trait>(
&'life0 self,
storage: &'life1 dyn StorageBackend,
request: LoginRequest,
) -> Pin<Box<dyn Future<Output = AuthResult<AuthOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for UserPassAuth
impl RefUnwindSafe for UserPassAuth
impl Send for UserPassAuth
impl Sync for UserPassAuth
impl Unpin for UserPassAuth
impl UnsafeUnpin for UserPassAuth
impl UnwindSafe for UserPassAuth
Blanket Implementations§
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