MCPcopy Create free account
hub / github.com/authzed/authzed-node / NewClientWithCustomCert

Function NewClientWithCustomCert

src/v1.ts:326–335  ·  view source on GitHub ↗
(
  token: string,
  endpoint = util.authzedEndpoint,
  certificate: Buffer,
  preconnect: PreconnectServices = PreconnectServices.PERMISSIONS_SERVICE,
  options?: grpc.ClientOptions,
)

Source from the content-addressed store, hash-verified

324 * @returns Client for calling Authzed APIs.
325 */
326export function NewClientWithCustomCert(
327 token: string,
328 endpoint = util.authzedEndpoint,
329 certificate: Buffer,
330 preconnect: PreconnectServices = PreconnectServices.PERMISSIONS_SERVICE,
331 options?: grpc.ClientOptions,
332) {
333 const creds = util.createClientCredsWithCustomCert(token, certificate);
334 return NewClientWithChannelCredentials(endpoint, creds, preconnect, options);
335}
336
337/**
338 * NewClientWithChannelCredentials creates a new client for calling Authzed APIs using custom grpc ChannelCredentials.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected