@serenity-is/corelib / Authorization / username
Variable: username
username:
string
Defined in: src/base/authorization.ts:233
Username of the currently logged-in user (synchronous).
Remarks
Getter over Authorization.userDefinition.Username. Prefer
Authorization.usernameAsync if UserData may not be loaded yet.
Returns undefined when no user is logged in.
Example
const name = Authorization.username;