• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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
16import UserAuthTypes;
17import IIdmGetCredInfoCallback;
18import IIdmGetSecureUserInfoCallback;
19import IIamCallback;
20import IEventListenerCallback;
21
22option_stub_hooks on;
23
24interface OHOS.UserIam.UserAuth.IUserIdm {
25    void OpenSession([in] int userId, [out] unsigned char[] challenge);
26
27    void CloseSession([in] int userId);
28
29    int GetCredentialInfo([in] int userId, [in] int authType,
30        [in] IIdmGetCredInfoCallback idmGetCredInfoCallback);
31
32    void GetSecInfo([in] int userId, [in] IIdmGetSecureUserInfoCallback IdmGetSecureUserInfoCallback);
33
34    void AddCredential([in] int userId, [in] IpcCredentialPara ipcCredentialPara,
35        [in] IIamCallback idmCallback, [in] boolean isUpdate);
36
37    void UpdateCredential([in] int userId, [in] IpcCredentialPara ipcCredentialPara,
38        [in] IIamCallback idmCallback);
39
40    void Cancel([in] int userId);
41
42    void EnforceDelUser([in] int userId, [in] IIamCallback idmCallback);
43
44    void DelUser([in] int userId, [in] unsigned char[] authToken,
45        [in] IIamCallback idmCallback);
46
47    void DelCredential([in] int userId, [in] unsigned long credentialId,
48        [in] unsigned char[] authToken, [in] IIamCallback idmCallback);
49
50    void ClearRedundancyCredential([in] IIamCallback idmCallback);
51
52    void RegistCredChangeEventListener([in] IEventListenerCallback listener);
53
54    void UnRegistCredChangeEventListener([in] IEventListenerCallback listener);
55
56    void GetCredentialInfoSync([in] int userId, [in] int authType,
57        [out] IpcCredentialInfo[] credentialInfoList);
58}