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

Function NewClient

src/v1.ts:306–315  ·  view source on GitHub ↗
(
  token: string,
  endpoint = util.authzedEndpoint,
  security: ClientSecurity = ClientSecurity.SECURE,
  preconnect: PreconnectServices = PreconnectServices.PERMISSIONS_SERVICE,
  options?: grpc.ClientOptions,
)

Source from the content-addressed store, hash-verified

304 * @returns Client for calling Authzed APIs.
305 */
306export function NewClient(
307 token: string,
308 endpoint = util.authzedEndpoint,
309 security: ClientSecurity = ClientSecurity.SECURE,
310 preconnect: PreconnectServices = PreconnectServices.PERMISSIONS_SERVICE,
311 options?: grpc.ClientOptions,
312) {
313 const creds = util.createClientCreds(endpoint, token, security);
314 return NewClientWithChannelCredentials(endpoint, creds, preconnect, options);
315}
316
317/**
318 * NewClientWithCustomCert creates a new client for calling Authzed APIs using a custom TLS certificate.

Callers 2

v1-promise.test.tsFile · 0.85
v1.test.tsFile · 0.85

Calls 1

Tested by

no test coverage detected