pub struct AuthManagerAdapter { /* private fields */ }
Expand description
Adapter that implements AuthProvider for the existing AuthManager
Implementations§
Source§impl AuthManagerAdapter
impl AuthManagerAdapter
Sourcepub fn new(
auth_manager: AuthManager,
http_provider: Arc<dyn AuthProvider>,
) -> Self
pub fn new( auth_manager: AuthManager, http_provider: Arc<dyn AuthProvider>, ) -> Self
Create a new adapter with an AuthManager and HTTP provider
Sourcepub async fn inner(&self) -> RwLockReadGuard<'_, AuthManager>
pub async fn inner(&self) -> RwLockReadGuard<'_, AuthManager>
Get a reference to the inner AuthManager (for read operations)
Sourcepub async fn inner_mut(&self) -> RwLockWriteGuard<'_, AuthManager>
pub async fn inner_mut(&self) -> RwLockWriteGuard<'_, AuthManager>
Get a mutable reference to the inner AuthManager (for write operations)
Trait Implementations§
Source§impl AuthProvider for AuthManagerAdapter
impl AuthProvider for AuthManagerAdapter
Source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
credentials: &'life1 TransportCredentials,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
credentials: &'life1 TransportCredentials,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Authenticate with the given credentials
Source§fn refresh_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Refresh an existing session
Source§fn validate_token<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_token<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate a session token
Auto Trait Implementations§
impl Freeze for AuthManagerAdapter
impl !RefUnwindSafe for AuthManagerAdapter
impl Send for AuthManagerAdapter
impl Sync for AuthManagerAdapter
impl Unpin for AuthManagerAdapter
impl !UnwindSafe for AuthManagerAdapter
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