AuthorizationProvider is an interface to obtain authorization information for NoSQL database operation. By default, the driver will use built-in authorization providers, such as IAMAuthorizationProvider and KVStoreAuthorizationProvider based on specified ServiceType and/or presense of service-specific configurations such as IAMConfig and KVStoreAuthConfig as properties iam and kvstore of AuthConfig. Alternatively, an application may choose to use custom authorization provider that implements AuthorizationProvider interface and set it as provider property of AuthConfig. Instead of a class implementing this interface, you may also set provider to a function with the signature of getAuthorization.

Hierarchy

  • AuthorizationProvider

Implemented by

Methods

  • Releases resources held by this provider.

    This method only needs to be implemented if the provider needs to release resources such as connections, open files, etc. when the instance of NoSQLClient is no longer needed.

    After this provider instance is passed to NoSQLClient via AuthConfig, the driver will invoke this method when calling close method of NoSQLClient, so applications should not call this method (unless this provider is used standalone).

    This method can be either sync or async depending on the resources that need to be released. If a Promise is returned, it can be awaited when calling close method of NoSQLClient.

    Implementations of this method should not throw errors or result in promise rejections (rather, any errors should be handled within the implementation).

    Returns void | Promise<void>

  • Optional callback called when NoSQLClient instance is initialized. Allows access to the information in the Config.

    Parameters

    Returns void

Generated using TypeDoc