Trait RefreshTokenRepository
Source pub trait RefreshTokenRepository: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
refresh_token: &'life1 RefreshToken,
) -> Pin<Box<dyn Future<Output = Result<RefreshToken, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RefreshToken>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_user_id<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<RefreshToken>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn revoke<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn revoke_all_for_user<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<u64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}