Package com.ngrok

Class TlsBuilder

    • Method Detail

      • domain

        public TlsBuilder domain​(String domain)
        Sets the domain to request for this TLS endpoint. Any valid domain or hostname that you have previously registered with ngrok. If using a custom domain, this requires registering in the ngrok dashboard and setting a DNS CNAME value.
        Parameters:
        domain - the domain
        Returns:
        the builder instance
      • mutualTLSCA

        public TlsBuilder mutualTLSCA​(byte[] mutualTLSCA)
        Sets the certificates to use for client authentication for this TLS endpoint.
        Parameters:
        mutualTLSCA - the TLS certificate, in bytes
        Returns:
        the builder instance
        See Also:
        Mutual TLS in the ngrok docs for additional details.
      • termination

        public TlsBuilder termination​(byte[] terminationCertPEM,
                                      byte[] terminationKeyPEM)
        Sets the certificate and key to use for TLS termination for this TLS endpoint.
        Parameters:
        terminationCertPEM - the TLS certificate, in bytes
        terminationKeyPEM - the TLS key, in bytes
        Returns:
        the builder instance
        See Also:
        TLS Termination in the ngrok docs for additional details.
      • getDomain

        public Optional<String> getDomain()
        Returns the domain to request for this TLS endpoint.
        Returns:
        the domain
      • getMutualTLSCA

        public byte[] getMutualTLSCA()
        Returns the certificates to use for client authentication for this TLS endpoint.
        Returns:
        the TLS certificates, in bytes.
      • getTerminationCertPEM

        public byte[] getTerminationCertPEM()
        Sets the certificate to use for TLS termination for this TLS endpoint.
        Returns:
        the TLS termination certificate, in bytes.
      • getTerminationKeyPEM

        public byte[] getTerminationKeyPEM()
        Sets the key to use for TLS termination for this TLS endpoint.
        Returns:
        the TLS termination key, in bytes.