Commit 5ea88bf9 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '34630-remove-iifes' into 'master'

mock_u2f_device.js: remove IIFE

Closes #34630

See merge request gitlab-org/gitlab!19197
parents 3f599913 f9688a30
/* eslint-disable no-unused-expressions, no-return-assign, no-param-reassign */
/* eslint-disable no-unused-expressions */
export default class MockU2FDevice {
constructor() {
this.respondToAuthenticateRequest = this.respondToAuthenticateRequest.bind(this);
this.respondToRegisterRequest = this.respondToRegisterRequest.bind(this);
window.u2f || (window.u2f = {});
window.u2f.register = (function(_this) {
return function(appId, registerRequests, signRequests, callback) {
return (_this.registerCallback = callback);
};
})(this);
window.u2f.sign = (function(_this) {
return function(appId, challenges, signRequests, callback) {
return (_this.authenticateCallback = callback);
};
})(this);
window.u2f.register = (appId, registerRequests, signRequests, callback) => {
this.registerCallback = callback;
};
window.u2f.sign = (appId, challenges, signRequests, callback) => {
this.authenticateCallback = callback;
};
}
respondToRegisterRequest(params) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment