nacos_sdk::api::plugin

Trait AuthPlugin

Source
pub trait AuthPlugin: Send + Sync {
    // Required methods
    fn login<'life0, 'async_trait>(
        &'life0 self,
        server_list: Vec<String>,
        auth_context: 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§

Source

fn login<'life0, 'async_trait>( &'life0 self, server_list: Vec<String>, auth_context: 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.

Source

fn get_login_identity(&self, resource: RequestResource) -> LoginIdentityContext

Implementors§