Retrieving the logged-in user's context

The API allows retrieving the context of the user currently filling out the form. The context describes users logged in on the form, in the Dashboard application, or in client applications integrated with the Eximee system, as well as information about the session of a user who is not logged in.

circle-exclamation

API

interface User {
    v1: {
        identity(): UserIdentity
    }
}


interface UserIdentity {
    userId(): string,
    roles(): string[],
    firstName(): string,
    lastName(): string,
    type(): 'client'|'employee'|'otp',
    system(): string
}
circle-info

Fields: firstName, lastName, roles depend on the authentication integration method used in the deployment.

Most often, the fields are available only for Employee-type (employee) authentication in Dashboard systems or Customer systems integrated with Eximee.

Execution context

The API is available from the object api.user.v1 and works in the form context.

It supports users working with the form:

  • logged in through the Web channel according to the deployment integration,

  • logged in through the Dashboard application,

  • logged in through authentication of integrated deployment systems,

  • not logged in, within the basic scope of user distinguishability.


Usage examples

Retrieving user data

Last updated

Was this helpful?