1/* 2 * Copyright (c) 2024 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 * @addtogroup HdfUserAuth 18 * @{ 19 * 20 * @brief Provides APIs for the user_auth driver. 21 * 22 * The user_auth driver provides a unified interface for the user_auth service to access the user_auth driver. 23 * After obtaining the user_auth driver proxy, the service can call related APIs to register executors, 24 * manage credentials, and complete password and biometric authentication. 25 * @since 5.0 26 */ 27 28/** 29 * @file IUserAuthInterface.idl 30 * 31 * @brief Declares the user_auth driver APIs, which can be used to register executors, 32 * manage credentials, and complete password and biometric authentication. 33 * 34 * @since 5.0 35 */ 36 37package ohos.hdi.user_auth.v1_3; 38 39import ohos.hdi.user_auth.v1_2.UserAuthTypes; 40import ohos.hdi.user_auth.v1_2.IUserAuthInterface; 41import ohos.hdi.user_auth.v1_3.UserAuthTypes; 42 43/** 44 * @brief Declares the APIs of the user_auth driver. 45 * 46 * @since 5.0 47 * @version 1.3 48 */ 49interface IUserAuthInterface extends ohos.hdi.user_auth.v1_2.IUserAuthInterface { 50 51 /** 52 * @brief Querying EnrolledId information. 53 * 54 * @param userId Indicates the user ID. 55 * @param authType Indicates the identification type. See @{AuthType}. 56 * @param info EnrolledId information. 57 * 58 * @return Returns <b>0</b> if the operation is successful. 59 * @return Returns a non-zero value if the operation fails. 60 * 61 * @since 5.0 62 * @version 1.3 63 */ 64 GetEnrolledState([in] int userId, [in] enum AuthType authType, 65 [out] struct EnrolledState info); 66 67 /** 68 * @brief Updates the authentication result, and evaluates the result of the authentication solution. 69 * 70 * @param contextId Indicates the context index. 71 * @param scheduleResult Indicates the authentication result issued by the executor. 72 * @param info Indicates authentication result information. See {@link AuthResultInfo}. 73 * @param enrolledState EnrolledID information. 74 * 75 * @return Returns <b>0</b> if the operation is successful. 76 * @return Returns a non-zero value if the operation fails. 77 * 78 * @since 5.0 79 * @version 1.3 80 */ 81 UpdateAuthenticationResultWithEnrolledState([in] unsigned long contextId, [in] unsigned char[] scheduleResult, 82 [out] struct AuthResultInfo info, [out] EnrolledState enrolledState); 83 84 /** 85 * @brief Check if unlock result can be reused and return token. 86 * 87 * @param info Request information of reused unLock result. See {@link ReuseUnlockInfo}. 88 * @param token Authentication token. 89 * 90 * @return Returns <b>0</b> if the operation is successful. 91 * @return Returns a non-zero value if the operation fails. 92 * 93 * @since 5.0 94 * @version 1.3 95 */ 96 CheckReuseUnlockResult([in] struct ReuseUnlockInfo info, [out] unsigned char[] token); 97} 98/** @} */ 99