Skip to main content

LoginBroker

Trait LoginBroker 

Source
pub trait LoginBroker {
    // Required method
    fn authenticate<'a>(
        &'a self,
        cfg: &'a AdminUiConfig,
        username: &'a str,
        password: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Capabilities, UiError>> + Send + 'a>>;
}

Required Methods§

Source

fn authenticate<'a>( &'a self, cfg: &'a AdminUiConfig, username: &'a str, password: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Capabilities, UiError>> + Send + 'a>>

Signs the operator in and reports what the operator’s ACLs permit.

Returns UiError::NotAuthenticated when the broker rejects the credentials, and UiError::BrokerConnection when no broker answers. The caller reports those two as different HTTP statuses.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: LoginBroker + ?Sized> LoginBroker for &T

Source§

fn authenticate<'a>( &'a self, cfg: &'a AdminUiConfig, username: &'a str, password: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Capabilities, UiError>> + Send + 'a>>

Implementors§