Skip to content

Assuming identities

CI edited this page Apr 3, 2019 · 3 revisions

Description

An identity can work with resources of an accessible identity by specifying (we use the term "assuming") the login of the resource owner.

Working with accessible identities

The following operations allow operating with accessible identities:

await aliceSession.renewKeys(aliceChildIdentity.login, 'aliceChildP@ssw0rd');

Assuming identities for resources accessing

To work with resources of an accessible identity the identity's login has to be specified:

let aliceChildIdentityResource = await new DataPeps.ResourceAPI(
  aliceSession
).get(aliceChildIdentityResourceId, { assume: aliceChildIdentity.login });
await new DataPeps.ResourceAPI(aliceSession).delete(
  aliceChildIdentityResourceId,
  {
    assume: aliceChildIdentity.login
  }
);
await new DataPeps.ResourceAPI(aliceSession).extendSharingGroup(
  aliceChildIdentityResourceId,
  [bob.login],
  { assume: aliceChildIdentity.login }
);