| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| AppScope/ | 06-May-2025 | - | 35 | 32 | ||
| entry/ | 06-May-2025 | - | 1,145 | 1,049 | ||
| hvigor/ | 06-May-2025 | - | 38 | 36 | ||
| screenshots/ | 06-May-2025 | - | ||||
| .gitignore | D | 06-May-2025 | 133 | 12 | 12 | |
| README.md | D | 06-May-2025 | 5 KiB | 92 | 68 | |
| build-profile.json5 | D | 06-May-2025 | 1.4 KiB | 58 | 57 | |
| code-linter.json5 | D | 06-May-2025 | 958 | 35 | 34 | |
| hvigorfile.ts | D | 06-May-2025 | 843 | 22 | 5 | |
| oh-package.json5 | D | 06-May-2025 | 834 | 26 | 24 | |
| ohosTest.md | D | 06-May-2025 | 2.5 KiB | 15 | 13 |
README.md
1# DomainAccount 2 3### 介绍 4 5用户可以在系统中添加域账号,后续可以使用该账号登录、使用系统。 6 7当需要验证域账号身份(比如屏幕解锁、登录会话失效等场景)时,可以使用系统提供的接口对域账号进行身份认证。 8 9OEM厂商可以采用插件方式定制化域账号管理能力,系统提供了域账号插件注册和注销能能力。 10 11实现对以下指南文件中[管理域账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-domain-account.md) [域账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/auth-domain-account.md) [管理域账号插件](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-domain-plugin.md) 示例代码片段的工程化。保证指南中示例代码与sample工程文件同源。 12 13### 效果预览 14 15| 首页 | 域账号插件管理页面 | 注册插件及结果 | 16| :----------------------------------------------------------: | :----------------------------------------------------------: | ------------------------------------------------------------ | 17| <img src="./screenshots/DomainAccount_1.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_2.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_3.png" width="360" style="zoom:33%;" /> | 18| 注销插件及结果 | 域账号管理页面 | 判断指定域账号是否存在及结果 | 19| <img src="./screenshots/DomainAccount_12.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_4.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_5.png" width="360" style="zoom:33%;" /> | 20| 添加域账号及结果 | 删除域账号及结果 | 查询域账号信息和认证结果 | 21| <img src="./screenshots/DomainAccount_6.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_7.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_8.png" width="360" style="zoom:33%;" /> | 22| 域账号认证页面 | 使用密码认证域账号及结果 | 弹窗验证域账号及结果 | 23| <img src="./screenshots/DomainAccount_9.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_10.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/DomainAccount_11.png" width="360" style="zoom:33%;" /> | 24 25### 使用说明 26 271. 在主界面,点击ManageDomainAccountsPlugin,进入域账号插件管理页面。 282. 点击注册插件按钮,进行插件注册。 293. 进入管理域账号管理页面。 304. 点击判断指定域账号是否存在。 315. 点击添加域账号。 326. 点击删除域账号。 337. 点击查询域账号信息。 348. 进入认证域账号界面。 359. 点击使用密码认证域账号。 3610. 点击使用弹窗验证域账号。 3711. 回到域账号插件管理页面。 3812. 点击注销插件按钮,进行注销插件。 39 40### 工程目录 41 42``` 43entry/src/ 44 ├── main 45 │ ├── ets 46 │ │ ├── entryability 47 │ │ ├── entrybackupability 48 │ │ ├── pages 49 | | ├──DomainAccount 50 | | | ├──AuthenticationDomainAccount // 域账号管理示例代码 51 | | | ├──ManageDomainAccounts // 域处理示例代码 52 | | | └──ManageDomainAccountsPlugin // 域账号插件示例代码 53 │ │ ├── Index.ets 54 │ ├── module.json5 55 │ └── resources 56 ├── ohosTest 57 │ ├── ets 58 │ │ ├── test 59 │ │ ├── Ability.test.ets // 自动化测试代码 60``` 61 62### 相关权限 63 64ohos.permission.MANAGE_LOCAL_ACCOUNTS 65 66ohos.permission.GET_DOMAIN_ACCOUNTS 67 68ohos.permission.ACCESS_USER_AUTH_INTERNAL 69 70### 依赖 71 72不涉及。 73 74### 约束与限制 75 761.本示例仅支持标准系统上运行, 支持设备:RK3568。 77 782.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 79 803.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 81 82### 下载 83 84如需单独下载本工程,执行如下命令: 85 86```` 87git init 88git config core.sparsecheckout true 89echo code/DocsSample/Account/DomainAccount > .git/info/sparse-checkout 90git remote add origin https://gitee.com/openharmony/applications_app_samples.git 91git pull origin master 92````