OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @fileoverview Provides a "bottom half" helper to assist with raw enroll |
| 7 * requests. |
| 8 * @author juanlang@google.com (Juan Lang) |
| 9 */ |
| 10 'use strict'; |
| 11 |
| 12 /** |
| 13 * A helper for enroll requests. |
| 14 * @extends {Closeable} |
| 15 * @interface |
| 16 */ |
| 17 function EnrollHelper() {} |
| 18 |
| 19 /** |
| 20 * Attempts to enroll using the provided data. |
| 21 * @param {Array} enrollChallenges an array enroll challenges. |
| 22 * @param {Array.<SignHelperChallenge>} signChallenges a list of sign |
| 23 * challenges for already enrolled gnubbies, to prevent double-enrolling a |
| 24 * device. |
| 25 */ |
| 26 EnrollHelper.prototype.doEnroll = |
| 27 function(enrollChallenges, signChallenges) {}; |
| 28 |
| 29 /** Closes this helper. */ |
| 30 EnrollHelper.prototype.close = function() {}; |
| 31 |
| 32 /** |
| 33 * A factory for creating enroll helpers. |
| 34 * @interface |
| 35 */ |
| 36 function EnrollHelperFactory() {} |
| 37 |
| 38 /** |
| 39 * Creates a new enroll helper. |
| 40 * @param {!Countdown} timer Timer after whose expiration the caller is no |
| 41 * longer interested in the result of an enroll request. |
| 42 * @param {function(number, boolean)} errorCb Called when an enroll request |
| 43 * fails with an error code and whether any gnubbies were found. |
| 44 * @param {function(string, string)} successCb Called with the result of a |
| 45 * successful enroll request, along with the version of the gnubby that |
| 46 * provided it. |
| 47 * @param {(function(number, boolean)|undefined)} opt_progressCb Called with |
| 48 * progress updates to the enroll request. |
| 49 * @param {string=} opt_logMsgUrl A URL to post log messages to. |
| 50 * @return {EnrollHelper} the newly created helper. |
| 51 */ |
| 52 EnrollHelperFactory.prototype.createHelper = |
| 53 function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {}; |
OLD | NEW |