Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The MIRACL Trust Flutter Plugin provides the following functionalities:
- [Authentication](#authentication)
- [Signing](#signing)
- [QuickCode](#quickcode)
- [User Management](#user-management)

This plugin implements method-channel communication with
MIRACL’s iOS and Android SDKs. It leverages the
Expand Down Expand Up @@ -334,6 +335,61 @@ try {
}
```

### User Management

The MIRACL Trust Flutter plugin provides several methods for managing users registered
on a device. These operations allow you to retrieve user information or delete
previously registered users.

#### Get a registered user

To retrieve a specific registered user by their User ID, use the
[getUser](https://pub.dev/documentation/flutter_miracl_sdk/latest/flutter_miracl_sdk/MIRACLTrust/getUser.html)
method:

```dart
try {
final user = await miraclTrust.getUser(userId);
if (user != null) {
// User exists.
} else {
// No user registered with this User ID.
}
} catch (e) {
// Cannot retrieve the user due to an error.
}
```

#### Get all registered users

To obtain the list of all users registered on а device, call the
[getUsers](https://pub.dev/documentation/flutter_miracl_sdk/latest/flutter_miracl_sdk/MIRACLTrust/getUsers.html)
method:

```dart
try {
final users = await miraclTrust.getUsers();
// Handle list of registered users.
} catch (e) {
// Cannot retrieve users due to an error.
}
```

#### Delete a registered user

To delete a previously registered user from a device, call the
[delete](https://pub.dev/documentation/flutter_miracl_sdk/latest/flutter_miracl_sdk/MIRACLTrust/delete.html)
method:

```dart
try {
await miraclTrust.delete(user);
// User deleted successfully.
} catch (e) {
// Cannot delete the user due to an error.
}
```

## FAQ

1. What is Activation Token?
Expand Down