IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API


Return the login name of the user who is logged in. The login name is the name that the user entered when logging in.

Applicable only to applications that support login.

Parameter Description
realm Optional. The name of a realm defined in authenticationConfig.xml.

If specified, the realm must be a Facebook realm. The use of Facebook realms is deprecated in Worklight version 5.0.5. Support might be removed in any future version.

If no value is specified, the method returns the login name in the resource realm that is assigned to the application when it was deployed.

Return Value

The login name of the user who is logged in, or NULL if the login name is unknown.

Parent JavaScript client-side API