cognito-srp
Version:
Secure Remote Password protocol implementation compatible with Amazon Cognito.
19 lines (18 loc) • 683 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const lib_1 = require("../lib");
const constants_1 = require("./constants");
describe('ClientPasswordChallenge', () => {
let challenge;
beforeAll(() => {
challenge = new lib_1.ClientPasswordChallenge(constants_1.poolname, constants_1.clientUser, constants_1.secret);
});
it('should calculate A', () => {
const A = challenge.calculateA();
expect(A).toMatchSnapshot();
});
it('should get a session', () => {
const session = challenge.getSession(constants_1.publicKey, constants_1.salt);
expect(session.getHkdf()).toMatchSnapshot();
});
});