For the complete documentation index, see llms.txt. This page is also available as Markdown.

Logged-in user 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.

User API (api.user.v1)

A universal interface that precisely describes users across all access channels (logged in via Web, via the Dashboard application, in integrated systems, and unauthenticated users).

Availability: Feature available since platform version 4.737.0. Works on requests launched in the WebForms application and in the Eximee Dashboard system.

User identity structure (UserIdentity)

Method api.user.v1.getIdentity() returns an object representing the current identity. The table below describes its default, most commonly encountered properties:

Field
Type
Description

userId

String

Unique user identifier.

username

String

User name intended for display.

roles

Array<String>

List of roles assigned to the user as an array of strings (e.g. ["EXIMEE_BROKER", "USER"]).

firstName

String

User's first name.

lastName

String

User's last name.

type

String

Authentication type. Returns one of the values: 'client' (client), 'employee' (employee) or 'otp' (one-time password).

system

String

Identifier of the system providing authentication.


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


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

The fields username, firstName, lastName, roles depend on the authentication integration method used in the implementation.

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

Retrieving user data

Example of using the User API with role validation

The following script retrieves the user's identity, checks whether they have the appropriate role to perform the action, and if not, throws a business exception and stops execution.

Last updated

Was this helpful?