-
Notifications
You must be signed in to change notification settings - Fork 7
Session
A session is a period of information interchange between an authenticated identity and DataPeps.
A user establishes a session by logging in to the DataPeps service. After establishing a session an identity can send authenticated requests to the service and use the SDK functions.
Sessions have validity period. A session is renewed automatically. The user should log out by closing the session after finishing working with DataPeps.
An identity logs in to DataPeps with the use of the identity's login and secret:
let aliceSession = await sdk.login("alice", "aliceP@ssw0rd")
An identity can then establish a new session for any identity from the access group:
let aliceSecondSession = await aliceSession.createSession("aliceSecond")
In this way an identity for which no secret was specified during its creation can log in.
An identity closes the session like this:
await aliceSession.close();
Session establishment — an identity logs in and out.