account.md 4.7 KB
Newer Older
A
Annie_wang 已提交
1
# Account
M
mamingshuai 已提交
2

A
Annie_wang 已提交
3
## Introduction
M
mamingshuai 已提交
4

A
Annie_wang 已提交
5
In the standard system, the Account subsystem provides basic capabilities such as OS account lifecycle management, distributed account login status management, and app account information management.
M
mamingshuai 已提交
6

A
Annie_wang 已提交
7
## Architecture
M
mamingshuai 已提交
8

A
Annie_wang 已提交
9
**Figure 1** Account subsystem architecture
M
mamingshuai 已提交
10 11


A
Annie_wang 已提交
12
![](figures/en_image_account_struct.png)
M
mamingshuai 已提交
13

A
Annie_wang 已提交
14
## Directory Structure
M
mamingshuai 已提交
15 16

```
A
Annie_wang 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
/base/account/os_account
├── dfx                      
│   ├── hidumper_adapter     # Code of the adapter for exporting system service information         
│   ├── hisysevent_adapter   # Code of the system event logging adapter         
├── figures                  # Figures
├── frameworks               # Code of the account subsystem
│   ├── account_iam          # Internal API code for account identity authentication and access management
│   │   └── src              # Code for implementing internal APIs for account identity authentication and access management         
│   ├── appaccount           # Internal API code of the app account module
│   │   └── native           # Code for implementing the internal APIs of the app account module
│   ├── common               # Code of the common module
│   │   ├── account_error    # Error codes
│   │   ├── database         # Database code
│   │   ├── file_operator    # File operator code
│   │   ├── log              # Code for printing logs
│   │   ├── perf_stat        # Code for performance statistics
│   │   └── test             # Test code for the common module
│   ├── ohosaccount          # Internal API code of the distributed account module
│   │   ├── native           # Code for implementing the internal APIs of the distributed account module
│   │   └── test             # Test code for the distributed account internal APIs
│   └── osaccount            # Internal API code of the OS account module
│       ├── core             # OS account IPC
│       └── native           # Code for implementing the internal APIs of the OS account module
├── interfaces               # Account subsystem APIs exposed externally 
│   ├── innerkits            # Internal API header files
│   │   ├── account_iam      # Account identity authentication and access management
│   │   ├── appaccount       # Header files of the app account internal APIs
│   │   ├── ohosaccount      # Header files of the distributed account internal APIs
│   │   └── osaccount        # Header files of the OS account internal APIs
│   └── kits                 # Encapsulation of external APIs
│       └── napi             # External API encapsulation code of the account subsystem
├── sa_profile               # SA profile directory of the account subsystem
├── services                 # accountmgr service code
│   └── accountmgr           # Account subsystem service code
│       ├── include          # Service code header files
│       ├── src              # Source code of the account subsystem service code
│       └── test             # Test of the account subsystem service code
├── test                     # Test code
│   ├── fuzztest             # Fuzzy test code
│   ├── resource             # Test resource files
│   └── systemtest           # System test code
└── tools                    # Tool code
    ├── acm                  # acm tool code
    │   ├── include          # acm header files
    │   └── src              # acm source file
    └── test                 # acm test code
M
mamingshuai 已提交
63 64
```

A
Annie_wang 已提交
65
## Description
M
mamingshuai 已提交
66

A
Annie_wang 已提交
67
### Modules
M
mamingshuai 已提交
68

A
Annie_wang 已提交
69 70 71 72 73
| Module    | Description                                                        |
| ---------- | ------------------------------------------------------------ |
| OS account  | Provides APIs for adding, deleting, querying, modifying, and starting OS accounts and subscribing to OS account information.    |
| Distributed account| Provides APIs for managing distributed account login status, supports interactions with cloud account applications on devices, and provides capabilities for querying and updating cloud account login status.|
| App account  | Provides APIs for adding, deleting, querying, modifying, and authenticating app accounts.          |
M
mamingshuai 已提交
74 75


A
Annie_wang 已提交
76
### How to Use
M
mamingshuai 已提交
77

A
Annie_wang 已提交
78 79 80
- [OS Account Management](../application-dev/reference/apis/js-apis-osAccount.md)
- [Distributed Account Management](../application-dev/reference/apis/js-apis-distributed-account.md)
- [App Account Management](../application-dev/reference/apis/js-apis-appAccount.md)
M
mamingshuai 已提交
81

A
Annie_wang 已提交
82 83 84 85 86
## Repositories Involved

**Account Subsystem**

[account_os_account](https://gitee.com/openharmony/account_os_account)