forked from google/u2f-ref-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapprovedorigins.js
29 lines (26 loc) · 920 Bytes
/
approvedorigins.js
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
29
// 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 Provides an interface to check whether the user has approved
* an origin to use security keys.
*
*/
'use strict';
/**
* Allows the caller to check whether the user has approved the use of
* security keys from an origin.
* @interface
*/
function ApprovedOrigins() {}
/**
* Checks whether the origin is approved to use security keys. (If not, an
* approval prompt may be shown.)
* @param {string} origin The origin to approve.
* @param {number=} opt_tabId A tab id to display approval prompt in, if
* necessary.
* @return {Promise<boolean>} A promise for the result of the check.
*/
ApprovedOrigins.prototype.isApprovedOrigin = function(origin, opt_tabId) {};