function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RanlouRanlou 

Obtaining a user ID from auth token

I am implementing a method that receives an authentication token from a user. Based on that token, how can I get the ID of the user that owns the token? The method is being called by an iPhone application. Here is the method declarartion:

 

@future(callout=true)
global static void getItems(String authToken)

 

 

Thanks

SFDCMattSFDCMatt

I'm interested in this as well. I want to be able to identify, on the Salesforce side, which user is initiating a REST request.

 

Did you ever figure out how to do this?

SFDCMattSFDCMatt

Actually, does the UserInfo class help you out here?

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm

 

Can you simply say UserInfo.getUserName?