pub trait AuthPlugin: Send + Sync {
// Required methods
fn login<'life0, 'async_trait>(
&'life0 self,
server_list: Arc<Vec<String>>,
auth_context: Arc<AuthContext>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_login_identity(
&self,
resource: RequestResource,
) -> LoginIdentityContext;
}Expand description
Auth plugin in Client. This api may change in the future, please forgive me if you customize the implementation.
Required Methods§
Sourcefn login<'life0, 'async_trait>(
&'life0 self,
server_list: Arc<Vec<String>>,
auth_context: Arc<AuthContext>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait>(
&'life0 self,
server_list: Arc<Vec<String>>,
auth_context: Arc<AuthContext>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Login with AuthContext, Note that this method will be scheduled continuously.
Sourcefn get_login_identity(&self, resource: RequestResource) -> LoginIdentityContext
fn get_login_identity(&self, resource: RequestResource) -> LoginIdentityContext
Get the LoginIdentityContext.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AuthPlugin for HttpLoginAuthPlugin
Available on crate feature
auth-by-http only.