@openfga/sdk
Version:
JavaScript and Node.js SDK for OpenFGA
54 lines (53 loc) • 1.64 kB
TypeScript
/**
* JavaScript and Node.js SDK for OpenFGA
*
* API version: 1.x
* Website: https://openfga.dev
* Documentation: https://openfga.dev/docs
* Support: https://openfga.dev/community
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
*
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
*/
import { AxiosInstance } from "axios";
import { AuthCredentialsConfig } from "./types";
import { TelemetryConfiguration } from "../telemetry/configuration";
export declare class Credentials {
private authConfig;
private axios;
private telemetryConfig;
private baseOptions?;
private accessToken?;
private accessTokenExpiryDate?;
static init(configuration: {
credentials: AuthCredentialsConfig;
telemetry: TelemetryConfiguration;
baseOptions?: any;
}, axios?: AxiosInstance): Credentials;
constructor(authConfig: AuthCredentialsConfig, axios: AxiosInstance | undefined, telemetryConfig: TelemetryConfiguration, baseOptions?: any | undefined);
/**
* Sets the default config values
* @private
*/
private initConfig;
/**
*
* @throws {FgaValidationError}
*/
isValid(): void;
/**
* Get access token, request a new one if not cached or expired
* @return string
*/
getAccessTokenHeader(): Promise<{
name: string;
value: string;
} | undefined>;
private getAccessTokenValue;
/**
* Request new access token
* @return string
*/
private refreshAccessToken;
private buildClientAuthenticationPayload;
}