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>
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.