Delete Users
The example-3
script authenticates an Integration Service client to manage Identities using the Admin identity created in example-0 and then performs the following tasks:
- Creates a new identity.
- Removes it from Integration Services.
- Verifies that the identity still exists on the Tangle.
You can run the example with the following command:
- Java
- Node.js
Remove User from Integration Services Database
You can remove an identity from the Integration Services backend by running the following script:
- Java
- Node.js
// Remove the user and also revoke the user's credentials
identityClient.remove(someIdentity.getId(), true);
// Remove the user and also revoke the user's credentials
await identity.remove(userIdentity.id, true);
note
You can only remove an identity in the Integration Services backend, the Identity cannot be removed from the Tangle.
Get an Identity Directly from the Tangle
You can retrieve an Identity from the Tangle by running the following script:
- Java
- Node.js
JSONObject recoveredIdentity = identityClient.latestDocument(someIdentity.getId());
const recoveredIdentity = await identity.latestDocument(userIdentity.id);