@midware/mauth
Version:
A simple auth middleware for Node.js
36 lines • 1.22 kB
TypeScript
import AuthService from './util/authService';
import Identification from './util/identification';
import ICrypt from './iCrypt';
export default class Key implements AuthService {
private configREST;
private crypt;
key(): Promise<string>;
privateKey(): Promise<string | undefined>;
protected getKey(): Promise<string>;
protected refreshKey(): Promise<void>;
protected static _instance: Key;
protected constructor(crypt?: ICrypt);
static getInstance(crypt?: ICrypt): Key;
protected host?: string;
protected _privateKey?: string;
protected _publicKey?: string;
protected keyTimerRunning: boolean;
protected authToken: any;
protected tokenTimerRunning: any;
protected credential?: {
type: string;
identification: string;
key: string;
};
config(): Promise<{
headers: {
authorization: string;
};
}>;
protected getToken(): Promise<string>;
protected refreshToken(): Promise<void>;
token(): Promise<string>;
verify(rIdentification: Identification, identifications: Identification[]): Promise<void>;
generateHash(key: string): Promise<string>;
}
//# sourceMappingURL=key.d.ts.map