forked from google/u2f-ref-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusbhelper.js
More file actions
28 lines (24 loc) · 810 Bytes
/
usbhelper.js
File metadata and controls
28 lines (24 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2014 Google Inc. All rights reserved
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
/**
* @fileoverview Implements a helper using USB gnubbies.
*/
'use strict';
/**
* @constructor
* @extends {GenericRequestHelper}
*/
function UsbHelper() {
GenericRequestHelper.apply(this, arguments);
var self = this;
this.registerHandlerFactory('enroll_helper_request', function(request) {
return new UsbEnrollHandler(/** @type {EnrollHelperRequest} */ (request));
});
this.registerHandlerFactory('sign_helper_request', function(request) {
return new UsbSignHandler(/** @type {SignHelperRequest} */ (request));
});
}
inherits(UsbHelper, GenericRequestHelper);