2017-05-21 06:15:34 +07:00
|
|
|
|
|
|
|
import sinon = require("sinon");
|
|
|
|
|
|
|
|
export interface UserDataStore {
|
|
|
|
set_u2f_meta: sinon.SinonStub;
|
|
|
|
get_u2f_meta: sinon.SinonStub;
|
|
|
|
issue_identity_check_token: sinon.SinonStub;
|
|
|
|
consume_identity_check_token: sinon.SinonStub;
|
2017-05-21 17:14:59 +07:00
|
|
|
get_totp_secret: sinon.SinonStub;
|
2017-05-22 03:45:54 +07:00
|
|
|
set_totp_secret: sinon.SinonStub;
|
2017-05-21 06:15:34 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
export function UserDataStore(): UserDataStore {
|
|
|
|
return {
|
|
|
|
set_u2f_meta: sinon.stub(),
|
|
|
|
get_u2f_meta: sinon.stub(),
|
|
|
|
issue_identity_check_token: sinon.stub(),
|
2017-05-21 17:14:59 +07:00
|
|
|
consume_identity_check_token: sinon.stub(),
|
2017-05-22 03:45:54 +07:00
|
|
|
get_totp_secret: sinon.stub(),
|
|
|
|
set_totp_secret: sinon.stub()
|
2017-05-21 06:15:34 +07:00
|
|
|
};
|
|
|
|
}
|