question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It would be useful to have a method/primitive that expresses an ArcGIS User. This feels similar to the IPortal and getSelf() method in arcgis-rest-request.

Note that an IPortal returned by request.getSelf() includes a user property, but this object doesn’t appear to be a fully-qualified User per the REST API spec.

User spec https://developers.arcgis.com/rest/users-groups-and-items/user.htm

The following works fine today:

import { request } from '@esri/arcgis-rest-request';

// session === UserSession();

// use request module to fetch user profile
request(`${session.portal}/community/users/${session.username}`, {
  authentication: session
})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jgravoiscommented, Jun 6, 2018

@tomwayson and i both ultimately got our way.

v1.1.2 included this:

import { getUser } from '@esri/arcgis-rest-users';

getUser("jsmith") // returns IUser

in v1.4.0 we also introduced support for

import { UserSession } from '@esri/arcgis-rest-auth';

const session = new UserSession({
  username: "jsmith",
  password: "123456"
})

session.getUser() // returns IUser and caches the response
1reaction
tomwaysoncommented, Mar 21, 2018

I feel like we need a new package (@esri/arcgis-rest-users) to manage users. It would have getUser() and other functions for all the operations under the “Community - User” left nav here.

IUser itself will probably end up in common types and shared amongst the auth and groups packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IUser Interface (Microsoft.AspNet.Identity)
The unique identifier for the user.(Inherited from IUser<TKey>.) System_CAPS_pubproperty, UserName. The unique name for the user.(Inherited from ...
Read more >
What is IUSER in IIS? - Windows Server - Bleeping Computer
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using ...
Read more >
IUser - SAP Help Portal
This interface provides read-access to the user's attributes, and offers basic support for authorization checking. Implementations of this interface must make ...
Read more >
AWS CDK - interface IUser
The principal to grant permissions to. node. Type: ConstructNode. The construct tree node for this construct. policyFragment. Type ...
Read more >
IUser Properties - IBM
For IUser and IGroup classes, the Id property takes the value of the Security Identifier (SID) rather than the 128-bit GUID. The string...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found