• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-5854

entry/12-May-2024-13,86312,883

figures/12-May-2024-

signature/12-May-2024-

.gitignoreD12-May-2024117 99

BUILD.gnD12-May-20241.3 KiB4438

LICENSED12-May-20249.9 KiB177150

OAT.xmlD12-May-20241.2 KiB2711

README.mdD12-May-20242.7 KiB5640

README_ZH.mdD12-May-20242.4 KiB5845

build-profile.json5D12-May-20241 KiB4140

bundle.jsonD12-May-2024631 3131

hvigorfile.tsD12-May-2024769 171

hvigorwD12-May-20242 KiB6455

hvigorw.batD12-May-20242.1 KiB8061

oh-package.json5D12-May-2024818 2725

package.jsonD12-May-2024427 2120

README.md

1# Authentication Widget
2
3## Introduction
4
5The Authentication Widget works with the User Authentication Framework (user_auth_framework) to provide a user authentication interaction interface when the user_auth_framework processes user authentication requests. The user interface provided by the authentication widget supports custom display information and provides buttons for the user to switch the authentication mode or cancel the authentication.
6
7**Figure 1** Authentication Widget architecture
8
9<img src="figures/authwidget_architecture_en.png" alt="authentication widge architecture"/>
10
11## Directory Structure
12
13```
14//base/useriam/auth_widget
15├── entry                              # entry module code
16│   ├── src/main
17│   │          ├─ets
18│   │          │  └─extensionability   # Implementation of system dialog boxes
19│   │          │  └─common             # Common components and utils
20│   │          │  └─pages              # Dialog boxes displayed during the user authentication
21│   │          │  └─image              # Preinstalled icon resources
22│   │          └─resources             # Resource files
23│   │          └─module.json5          # Global configuration file
24│   └─ src/ohostest                    # Unit test implemented by arkXTest
25├── signature                          # Certificates
26└── LICENSE                            # License file
27└── figures                            # Figures used in the README
28```
29
30## Building the Authentication Widget
31
32In the root directory of the OpenHarmony source code, run the following command to build the Authentication Widget separately:
33
34```
35./build.sh --product-name rk3568 --ccache --build-target auth_widget
36```
37
38> **NOTE**
39>
40> --**product-name** specifies the product name, for example, **rk3568**.
41>
42> --**ccache** specifies the cache function used during the compilation.
43>
44> --**build-target** specifies the component to build.
45
46## Usage
47
48### Usage Guidelines
49
50- The Authentication Widget provides the default user identity authentication interface. For details about how to use the APIs, see the API reference of the User Authentication Framework. Use the **getUserAuthInstance** method with the widget to create an authentication instance, use the **AuthParam** to specify authentication parameters, and use **WidgetParam** to specify widget display parameters.
51- To ensure consistent user identity authentication experience, the authentication APIs that do not provide the user authentication interface will be deprecated. You are advised to use the authentication APIs provided by API version 10.
52
53## Repositories Involved
54
55**[useriam_user_auth_framework](https://gitee.com/openharmony/useriam_user_auth_framework)**
56

README_ZH.md

1# 统一认证控件
2
3- [简介](#简介)
4- [目录](#目录)
5- [说明](#说明)
6  - [使用说明](#使用说明)
7- [相关仓](#相关仓)
8## 简介
9
10**统一认证控件** 配套统一用户认证框架(user_auth_framework),在统一用户认证框架处理用户认证请求时,提供用户认证交互界面。界面支持调用的业务应用自定义标题等显示信息,并提供相应的功能按钮支持用户切换认证方式或取消认证。
11**图1** 统一认证控件架构图
12<img src="figures/authwidget_architecture_ZH.png" alt="统一认证控件架构图" style="zoom:80%;" />
13
14## 目录
15
16```
17//base/useriam/auth_widget
18├── entry                              # entry模块目录
19│   ├── src/main
20│   │          ├─ets
21│   │          │  └─extensionability   # 系统弹框扩展能力实现,入口
22│   │          │  └─common             # 公共工具目录
23│   │          │  └─pages              # 弹框内容页面
24│   │          │  └─image              # 页面使用的预置图标资源
25│   │          └─resources             # 资源文件
26│   │          └─module.json5          # 全局配置文件
27│   └─ src/ohostest                    # arkXTest实现的自动化单元测试
28├── signature                          # 证书文件目录
29├── LICENSE                            # 许可文件
30└── figures                            # readme的截图
31```
32
33## 编译构建
34
35在OpenHarmony源码根目录下,调用以下指令,单独编译统一身份认证控件部件。
36
37```
38./build.sh --product-name rk3568 --ccache --build-target auth_widget
39```
40
41> 说明:
42>
43> --product-name:产品名称,例如rk3568。
44>
45> --ccache:编译时使用缓存功能。
46>
47> --build-target: 编译的部件名称。
48
49## 说明
50
51### 使用说明
52
531.  统一身份认证控件提供了系统默认的用户身份认证界面,具体调用方式请参考统一认证框架北向使用指导,选择使用带控件的接口getUserAuthInstance,AuthParam指定认证参数,WidgetParam指定控件显示参数。
542.  为确保用户在系统上有统一的的身份认证体验,不带认证界面的身份认证API后续将逐步废弃,建议开发者使用API 10提供的新用户身份认证接口。
55
56## 相关仓
57
58**[useriam_user_auth_framework](https://gitee.com/openharmony/useriam_user_auth_framework)**