Skip to main content

CredentialProvider

Trait CredentialProvider 

Source
pub trait CredentialProvider {
    // Required methods
    fn auth_trusted(&self, auth_provider: &Option<String>) -> bool;
    fn get_credentials(
        &self,
        auth_provider: &Option<String>,
    ) -> impl Future<Output = Result<Credentials, ()>> + Send;
}

Required Methods§

Source

fn auth_trusted(&self, auth_provider: &Option<String>) -> bool

provides a quick check to verify if a Auth Server is expected and trusted This function is expected to return quickly.

Source

fn get_credentials( &self, auth_provider: &Option<String>, ) -> impl Future<Output = Result<Credentials, ()>> + Send

Called by the client once we are connected to the server and the server is requiring us to provide Credentials. This function is expected to trigger UI to wait for a result. So the User might take a minute or so to log in. Throw Error in case you want to abort login.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§