hyper-auth-proxy 0.1.2

A simple auth reverse proxy, to authenticate via basic auth from a redis store.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

pub fn b64_decode(credentials: &str, _k: &str) -> Result<String, AuthProxyError> {
    Ok(String::from_utf8_lossy(&base64::decode(&credentials)?).to_string())
}

#[tokio::main]
async fn main() {
    env_logger::init();
    let (_tx, rx) = tokio::sync::oneshot::channel::<()>();
    let config = ProxyConfig::default();
    let server = run_service_with_decoder(config.clone(), rx, b64_decode).await;
    info!("Running auth proxy on {:?} with backend {:?}", config.address, config.back_uri);
    if let Err(e) = server.await {
        eprintln!("server error: {}", e);
    }
}