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
trick1trick1 

Rest based services

Hi Friends,

 

I have a situation in which i have customer portal and I have link on the customer portal which when clicked shyould take me to another web site.

 

I will be using rest based services.In this scenario

1)Which one isgoing to be client and which one is going to be server

2)In the remote settings what am i suppose to register

 

 

Please help

 

Thanks,

Trick

 

 

bhuyadavbhuyadav

Hi Trick1,

 

  1. Which one isgoing to be client and which one is going to be server:  Server would be the one from which you want to fetch the resources/data ie.Account/opportunities etc. and Client would be the one which is going to  access the data. If you elaborate the scenario more then We might come to the conclusion for server/client dilemma.
  2. In the remote settings what am i suppose to register- Its the URL which we need to specify whenever we try to access external URL from within salesforce.

More elaborated scenario would be helpful to understand your problem.

 

trick1trick1

Hi Bhuyadav,

 

I have salesforce portal and on that portal I have link so when some user selects a link,that link opens another web site whch is known as pamp.As of noew people have to put username and password in order to access it.Here ,I want to save pamp website users and passwords in salesfroce and then as when same user clicks on the link then  his username and password should be retrived and sent to the pamp which in turn returns access token to the portal so an access token is received and now the user can click on the web site without having to login again till the time session is valid.

 

I basically wants to use username password authentication mechanism to implement this functionality.Below I have mentioned my Scenario,I will be great if u can help me with it.

 

 

 

When a user selects the link  on the portal, a check is performed to determine if the user is logged into the portal

 

If logged in:

Step 1: Check if Pamp Account for current user already exists in the salesforce; If yes proceed to step 3, If no proceed to step 2

Step 2: If no: Create an pamp Global account for the current user via Pamp Account (REST service) and save pamp Global credentials in salesforce associated with current user then get a pamp token using pamp Global account credentials for current user

 

Step 3: If yes: Get a pamp token using pamp Global account credentials for current user: e.g.: http://api.pamp.com/rest/authentication?request=getToken&username=USERNAME&password=PASSWORD&f=JSON; proceed to step 4

Step 4: Open pamp with pamp token for current user e.g.: http://bap.pamp.com/pamp93/main.map?ESRISessionID=<TOKEN>

o

If not logged in: The system will prompt the user to create an account on the portal (Register on the portal);

 

After creating a portal account, user will be logged in and proceed to step 1 above

 

Thanks,

Trick

bhuyadavbhuyadav

Hi Trick1,

 

By the scenario you provided PAMP is going to be server in this case and Salesforce is going to be client.

 

Thanks,

bhupendra.