1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use futures::Future;
use interledger_service::{Account, Username};
use url::Url;
mod client;
mod server;
pub use self::client::HttpClientService;
pub use self::server::HttpServer;
pub trait HttpAccount: Account {
fn get_http_url(&self) -> Option<&Url>;
fn get_http_auth_token(&self) -> Option<&str>;
}
pub trait HttpStore: Clone + Send + Sync + 'static {
type Account: HttpAccount;
fn get_account_from_http_auth(
&self,
username: &Username,
token: &str,
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>;
}