Trait ic_agent::agent::http_transport::PasswordManager[][src]

pub trait PasswordManager {
    fn cached(&self, url: &str) -> Result<Option<(String, String)>, String>;
fn required(&self, url: &str) -> Result<(String, String), String>; }
Expand description

Implemented by the Agent environment to cache and update an HTTP Auth password. It returns a tuple of (username, password).

Required methods

Retrieve the cached value for a user. If no cache value exists for this URL, the manager can return None.

A call to the replica failed, so in order to succeed a username and password is required. If one cannot be provided (for example, there’s no terminal), this should return an error. If the username and password provided by this method does not work (the next request still returns UNAUTHORIZED), this will be called and the request will be retried in a loop.

Implementors