forked from google/u2f-ref-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorigincheck.js
More file actions
28 lines (25 loc) · 885 Bytes
/
origincheck.js
File metadata and controls
28 lines (25 loc) · 885 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 check whether an origin is allowed to assert an
* app id.
*
*/
'use strict';
/**
* Implements half of the app id policy: whether an origin is allowed to claim
* an app id. For checking whether the app id also lists the origin,
* @see AppIdChecker.
* @interface
*/
function OriginChecker() {}
/**
* Checks whether the origin is allowed to claim the app ids.
* @param {string} origin The origin claiming the app id.
* @param {!Array<string>} appIds The app ids being claimed.
* @return {Promise<boolean>} A promise for the result of the check.
*/
OriginChecker.prototype.canClaimAppIds = function(origin, appIds) {};