flv_tls_proxy/
authenticator.rs1use anyhow::Result;
2use async_trait::async_trait;
3
4use fluvio_future::net::TcpStream;
5use fluvio_future::rust_tls::DefaultServerTlsStream;
6
7#[async_trait]
9pub trait Authenticator: Send + Sync {
10 async fn authenticate(
11 &self,
12 incoming_tls_stream: &DefaultServerTlsStream,
13 target_tcp_stream: &TcpStream,
14 ) -> Result<bool>;
15}
16
17pub(crate) struct NullAuthenticator;
19
20#[async_trait]
21impl Authenticator for NullAuthenticator {
22 async fn authenticate(&self, _: &DefaultServerTlsStream, _: &TcpStream) -> Result<bool> {
23 Ok(true)
24 }
25}