fun tls(certificateChain: String, privateKey: String, configure: GrpcTlsServerCredentialsBuilder.() -> Unit): GrpcServerCredentials(source)
Configures and creates TLS (Transport Layer Security) credentials for the gRPC server.
This method allows specifying the server's certificate chain, private key, and additional configurations needed for setting up a secure communication channel over TLS.
Return
An instance of GrpcServerCredentials representing the configured TLS credentials that must be passed to credentials.
Parameters
certificateChain
A string representing the PEM-encoded certificate chain for the server.
privateKey
A string representing the PKCS#8 formatted private key corresponding to the certificate.
configure
A lambda to further customize the GrpcTlsServerCredentialsBuilder, enabling configurations like setting trusted root certificates or enabling client authentication.