• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit UserAuthenticationKit
19 */
20
21/**
22 * This module provides the capability to manage face auth.
23 *
24 * @namespace faceAuth
25 * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth
26 * @since 9
27 */
28declare namespace faceAuth {
29  /**
30   * Provides the abilities for face authentication.
31   *
32   * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth
33   * @systemapi Hide this for inner system use.
34   * @since 9
35   */
36  class FaceAuthManager {
37    /**
38     * Constructor to get the FaceAuthManager class instance.
39     *
40     * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth
41     * @systemapi Hide this for inner system use.
42     * @since 9
43     */
44    constructor();
45
46    /**
47     * Set XComponent surface id for camera preview during enroll.
48     *
49     * @permission ohos.permission.MANAGE_USER_IDM
50     * @param { string } surfaceId Indicates surface id for face enroll preview.
51     * @throws { BusinessError } 201 - Permission verification failed.
52     * @throws { BusinessError } 202 - The caller is not a system application.
53     * @throws { BusinessError } 12700001 - The operation is failed.
54     * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth
55     * @systemapi Hide this for inner system use.
56     * @since 9
57     */
58    setSurfaceId(surfaceId: string): void;
59  }
60}
61
62export default faceAuth;
63