brane_reg::server

Function serve_with_auth

Source
pub async fn serve_with_auth<F, E>(
    server_cert: impl AsRef<Path>,
    server_key: impl AsRef<Path>,
    ca_cert: impl AsRef<Path>,
    filter: F,
    address: SocketAddr,
) -> Result<(), Error>
where F: 'static + Send + Sync + Clone + Filter<Extract = E, Error = Rejection>, E: Reply,
Expand description

Function that serves a warp server, but now by providing additional information about the authenticated client.

§Arguments

  • server_cert: Path to the server’s certificate file.
  • server_key: Path to the server’s keyfile.
  • ca_cert: Path to the file that contains the root certificate by which all clients must have been signed.
  • filter: The warp filter to serve.
  • address: The address to serve on.

§Returns

Nothing - and by that we mean it typically doesn’t really return until the warp server is stopped for some reason.

§Errors

This function errors if we failed to serve properly.