Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![cfg_attr(docsrs, feature(doc_cfg))]

use anyhow::Result;
use auth_trait::Auth;

genv::s!(USER: String, PASSWORD: String);

pub struct AuthEnv;

impl Auth for AuthEnv {
  async fn verify(&self, _host: &str, username: &str, password: &str) -> Result<bool> {
    Ok(username == *USER && password == *PASSWORD)
  }
}