Class ChannelCredentialsAbstract

A class that contains credentials for communicating over a channel, as well as a set of per-call credentials, which are applied to every method call made over a channel initialized with an instance of this class.

Hierarchy

  • ChannelCredentials

Constructors

Properties

callCredentials: CallCredentials

Methods

  • Check whether two channel credentials objects are equal. Two secure credentials are equal if they were constructed with the same parameters.

    Parameters

    Returns boolean

  • Gets the set of per-call credentials associated with this instance.

    Returns CallCredentials

  • Gets a SecureContext object generated from input parameters if this instance was created with createSsl, or null if this instance was created with createInsecure.

    Returns null | ConnectionOptions

  • Indicates whether this credentials object creates a secure channel.

    Returns boolean

  • Returns a copy of this object with the included set of per-call credentials expanded to include callCredentials.

    Parameters

    • callCredentials: CallCredentials

      A CallCredentials object to associate with this instance.

    Returns ChannelCredentials

  • Return a new ChannelCredentials instance with credentials created using the provided secureContext. The resulting instances can be used to construct a Channel that communicates over TLS. gRPC will not override anything in the provided secureContext, so the environment variables GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will not be applied.

    Parameters

    • secureContext: SecureContext

      The return value of tls.createSecureContext()

    • Optional verifyOptions: VerifyOptions

      Additional options to modify certificate verification

    Returns ChannelCredentials

  • Return a new ChannelCredentials instance with no credentials.

    Returns ChannelCredentials

  • Return a new ChannelCredentials instance with a given set of credentials. The resulting instance can be used to construct a Channel that communicates over TLS.

    Parameters

    • Optional rootCerts: null | Buffer

      The root certificate data.

    • Optional privateKey: null | Buffer

      The client certificate private key, if available.

    • Optional certChain: null | Buffer

      The client certificate key chain, if available.

    • Optional verifyOptions: VerifyOptions

      Additional options to modify certificate verification

    Returns ChannelCredentials

Generated using TypeDoc