@akamai-consulting/edgegrid-js-fetch
Version:
Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec
43 lines (42 loc) • 1.48 kB
TypeScript
/** Class representing EdgeGrid credentials */
export default class EdgeGridCredentials {
#private;
/**
* Create an EdgeGridCredentials object.
*
* @param {string} client_secret - The client secret
* @param {string} host - The host
* @param {string} access_token - The access token
* @param {string} client_token - The client token
*
*/
constructor(client_secret: string, host: string, access_token: string, client_token: string);
/**
* Get the client token
* @returns {string} The client token.
*/
get clientToken(): string;
/**
* Get the host
* @returns {string} The host.
*/
get host(): string;
/**
* Get the access token
* @returns {string} The access token.
*/
get accessToken(): string;
/**
* Get the client secret
* @returns {string} The client secret.
*/
get clientSecret(): string;
/**
*
* @param {ReadableStream} readableStream A ReadableStream which provides the contents of an edgerc file
* @param {string} [conf=default] The name of the configuration section to use
* @returns {Promise<EdgeGridCredentials>} A Promise that resolves to an EdgeGridCredentials object
* which contains data for selected configuration section
*/
static parseEdgercStream(readableStream: ReadableStream, conf?: string): Promise<EdgeGridCredentials>;
}