pub struct EmailPasswordService<S> { /* private fields */ }Implementations§
Source§impl<S> EmailPasswordService<S>
impl<S> EmailPasswordService<S>
pub fn new( storage: S, events: EventBus, min_password_len: usize, session_ttl_secs: i64, ) -> Self
Sourcepub fn with_lockout(self, cfg: LockoutConfig) -> Self
pub fn with_lockout(self, cfg: LockoutConfig) -> Self
Enable brute-force lockout with the given configuration.
pub async fn sign_up(&self, req: SignUpRequest) -> Result<User>
pub async fn sign_in(&self, req: SignInRequest) -> Result<AuthResponse>
pub async fn sign_out(&self, session_id: Uuid) -> Result<()>
pub async fn sign_out_all(&self, user_id: Uuid) -> Result<()>
pub async fn list_sessions(&self, user_id: Uuid) -> Result<Vec<Session>>
Auto Trait Implementations§
impl<S> Freeze for EmailPasswordService<S>where
S: Freeze,
impl<S> !RefUnwindSafe for EmailPasswordService<S>
impl<S> Send for EmailPasswordService<S>where
S: Send,
impl<S> Sync for EmailPasswordService<S>where
S: Sync,
impl<S> Unpin for EmailPasswordService<S>where
S: Unpin,
impl<S> UnsafeUnpin for EmailPasswordService<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for EmailPasswordService<S>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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