1 // Copyright 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.
6 * @fileoverview Provides a Google corp implementation of IndividualAttestation.
11 * Google corp implementation of IndividualAttestation that requests
12 * individual certificates for corp accounts.
14 * @implements IndividualAttestation
16 function GoogleCorpIndividualAttestation() {}
19 * @param {string} appIdHash The app id hash.
20 * @return {boolean} Whether to request the individual attestation certificate
23 GoogleCorpIndividualAttestation.prototype.requestIndividualAttestation =
25 return appIdHash == GoogleCorpIndividualAttestation.GOOGLE_CORP_APP_ID_HASH;
29 * App ID used by Google employee accounts.
32 GoogleCorpIndividualAttestation.GOOGLE_CORP_APP_ID =
33 'https://www.gstatic.com/securitykey/a/google.com/origins.json';
36 * Hash of the app ID used by Google employee accounts.
39 GoogleCorpIndividualAttestation.GOOGLE_CORP_APP_ID_HASH =
40 B64_encode(sha256HashOfString(
41 GoogleCorpIndividualAttestation.GOOGLE_CORP_APP_ID));