+ 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?