In a web framework app, is it possible (via javascript) to get the name of the currently logged in user?
I would like to provide this in an ajax call when the user performs an action.
If you require splunkjs/mvc/sharedmodels
then you can run this:
console.log(sharedModels.get("user").entry.get("name"));
console.log(sharedModels.get("user").entry.content.get("realname"));
Produces this output:
"admin"
"Administrator"