trz_gateway_common/api/tunnel.rs
1use serde::Deserialize;
2use serde::Serialize;
3
4use crate::id::ClientName;
5
6/// Request body of the /remote/certificate API to issue a client certificate.
7#[derive(Debug, Serialize, Deserialize)]
8pub struct GetCertificateRequest<A, K = String> {
9 /// A secret code that the client needs to authenticate.
10 pub auth_code: A,
11
12 /// The public key of the certificate (the private key stays with the client).
13 pub public_key: K,
14
15 /// Uniquely identifies the client, will be set as the the common name of the issued certificate.
16 pub name: ClientName,
17}