Skip to main content

My Apex class  is consuming an external REST Webservice on behalf of multiple Salesforce users. Currently the requests are done by a single API user using an Auth Provider and Named Credential.

 

Now I want to let the service know more about the actual consuming (Salesforce) user. E.g. The response should depend on the users roles and permissions.

 

Passing such information as part of the request is unsafe. So I though why not "mirror" the users data on the side of the REST service and use technologies like SSO, SAML and or Oauth to

 

1) First let a Identity Provider recognize the user and then

2) have a Service Provider which then knows which user is requesting stuff

 

How would that be done? Is there a detailed description on how to configure that?

 

I also added that question to Stackexchange: https://salesforce.stackexchange.com/q/252888/256

5 comments
  1. Mar 8, 2019, 10:11 PM

    Sounds great. Is there any preliminary info on that I can already read?

    Besides that would there be a change to also do that use Custom Oauth Providers. I just learned that I could provide my own Custom Metadata and and a Custom Auth Provider class. Could I create tokens with special information using that?! Or would that be unsafe?

0/9000