pub struct Authenticator<D, U> { /* private fields */ }Implementations§
Source§impl<D, U> Authenticator<D, U>where
D: DatabaseAdapter<U>,
impl<D, U> Authenticator<D, U>where
D: DatabaseAdapter<U>,
pub async fn create_user( &self, data: UserData, attributes: U, ) -> Result<User<U>, AuthError>
pub async fn use_key( &self, provider_id: &str, provider_user_id: &str, password: Option<String>, ) -> Result<Key, AuthError>
pub async fn create_session( &self, user_id: UserId, ) -> Result<Session, AuthError>
pub async fn invalidate_session( &self, session_id: &str, ) -> Result<(), AuthError>
pub async fn get_user(&self, user_id: &UserId) -> Result<U, AuthError>
pub fn handle_request<'a>( &'a self, cookies: &CookieJar, method: &Method, headers: &HeaderMap, origin_url: &Url, ) -> Request<'a, D, U>
pub async fn update_user_attributes( &self, user_id: &UserId, attributes: U, ) -> Result<(), AuthError>
pub async fn invalidate_all_user_sessions( &self, user_id: &UserId, ) -> Result<(), AuthError>
pub async fn delete_user(&self, user_id: UserId) -> Result<(), AuthError>
pub async fn create_key( &self, user_id: UserId, user_data: UserData, key_type: &NaiveKeyType, ) -> Result<Key, AuthError>
pub async fn get_key( &self, provider_id: &str, provider_user_id: &str, ) -> Result<Key, AuthError>
pub async fn get_all_user_keys( &self, user_id: &UserId, ) -> Result<Vec<Key>, AuthError>
pub async fn update_key_password(&self, data: UserData) -> Result<(), AuthError>
pub async fn delete_key( &self, provider_id: &str, provider_user_id: &str, ) -> Result<(), AuthError>
Auto Trait Implementations§
impl<D, U> Freeze for Authenticator<D, U>where
D: Freeze,
impl<D, U> RefUnwindSafe for Authenticator<D, U>where
D: RefUnwindSafe,
U: RefUnwindSafe,
impl<D, U> Send for Authenticator<D, U>
impl<D, U> Sync for Authenticator<D, U>
impl<D, U> Unpin for Authenticator<D, U>
impl<D, U> UnwindSafe for Authenticator<D, U>where
D: UnwindSafe,
U: UnwindSafe,
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