pub struct HttpAuthService { /* private fields */ }
Expand description
HTTP implementation of AuthService
Implementations§
Source§impl HttpAuthService
impl HttpAuthService
Sourcepub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
pub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
Create a new HTTP auth service
Trait Implementations§
Source§impl AuthService for HttpAuthService
impl AuthService for HttpAuthService
Source§fn authenticate<'life0, 'async_trait>(
&'life0 self,
credentials: Credentials,
) -> Pin<Box<dyn Future<Output = ServiceResult<(String, User)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn authenticate<'life0, 'async_trait>(
&'life0 self,
credentials: Credentials,
) -> Pin<Box<dyn Future<Output = ServiceResult<(String, User)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Authenticate with the API
Source§fn logout<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn logout<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Logout from the API
Source§fn get_current_user<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_user<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get current user information
Source§fn validate_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ServiceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate session
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Source§impl Service for HttpAuthService
impl Service for HttpAuthService
Auto Trait Implementations§
impl Freeze for HttpAuthService
impl !RefUnwindSafe for HttpAuthService
impl Send for HttpAuthService
impl Sync for HttpAuthService
impl Unpin for HttpAuthService
impl !UnwindSafe for HttpAuthService
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