@villedemontreal/jwt-validator
Version:
Module to validate JWT (JSON Web Tokens)
104 lines • 2.68 kB
TypeScript
import { ILogger } from '@villedemontreal/logger';
/**
* Lib configs
*/
export declare class Configs {
isWindows: boolean;
libRoot: string;
/**
* The host to query the public keys
*/
private _host;
/**
* The endpoint to query the public keys
*/
private _endpoint;
/**
* The parameters to query the public keys
*/
private _fetchKeysParameters;
/**
* Cache duration
*/
private _cacheDuration;
/**
* When this library is used as a dependency in a project, the source project name will be the property name in the package.json of this project
*
* @private
* @type {string}
* @memberof Configs
*/
private readonly _sourceProjectName;
private _loggerCreator;
private _correlationIdProvider;
constructor();
/**
* Get the host to query the public keys
* @return {string} host
*/
getHost(): string;
/**
* Get the endpoint to query the public keys
* @return {string} endpoint
*/
getEndpoint(): string;
/**
* Get the parameters to query the public keys
* @return {string} fetchKeysParameters
*/
getFetchKeysParameters(): string;
/**
* Get the cache duration in seconds
* @return {number} cacheDuration
*/
getCacheDuration(): number;
/**
* Set the host to query the public keys
* @param {string} host
* @return
*/
setHost(host: string): void;
/**
* Set the endpoint to query the public keys
* @param {string} endpoint
* @return
*/
setEndpoint(endpoint: string): void;
/**
* Set the paramters to query the public keys
* @param {string} fetchKeysParameters
* @return
*/
setFetchKeysParameters(fetchKeysParameters: string): void;
/**
* Get the cache duration in seconds
* @param {number} cacheDuration
* @return
*/
setCacheDuration(cacheDuration: number): void;
/**
* The Logger creator
*/
get loggerCreator(): (name: string) => ILogger;
/**
* Sets the Logger creator.
*/
setLoggerCreator(loggerCreator: (name: string) => ILogger): void;
/**
* Sets the Correlation Id provider.
*/
setCorrelationIdProvider(correlationIdProvider: () => string): void;
/**
* Get the source project name where this library is imported
*
* @return {*} {string}
* @memberof Configs
*/
getSourceProjectName(): string;
/**
* The Correlation Id provider
*/
get correlationIdProvider(): () => string;
}
export declare const configs: Configs;
//# sourceMappingURL=configs.d.ts.map