@perfood/couch-auth
Version:
Easy and secure authentication for CouchDB/Cloudant. Based on SuperLogin, updated and rewritten in Typescript.
17 lines (16 loc) • 581 B
TypeScript
import { Hashing } from './hashing';
import { LocalHashObj } from './types/typings';
export declare class Session {
private hasher;
static invalidErr: {
status: number;
message: string;
};
constructor(hasher: Hashing);
/**
* Confirms that the password matches with the provided token and returns the
* token, if successful, but removes the information that should not be sent
* to the client.
*/
confirmToken<T extends LocalHashObj>(token: T, password: string): Promise<Omit<T, 'salt' | 'derived_key' | 'iterations'>>;
}