Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

AEM as Oauth client for external Oauth provider

Avatar

Level 4

Hi Experts,

 

We have one use case where we want to call third party API (salesforce API) from AEM. AEM will called the API and get response and send the response to angular to consume it on UI. Here client's expectation is to use the OAuth token approach to make the call to salesforce API instead of client ID and secret. Did anyone handled this usecase by using OAtuth token? If yes then could you please share the steps to handle it? or any documentation ?

 

~Samer

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @sameryadav,

First of all your requirement, to use AEM as Oauth token is seems to be not good. So you need to update it.

Since AEM is a CMS tool to keep it like that only, So What can you do in your requirement is simply create some OSGI configuration to configure client_id, client_secret and fallback_urls etc. then while making a call to salesforce use those fields for authorisation.

I think salesforce has rich support for Rest API Authorisation.

Please see the below URL:

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm

 

Hope this will help.

Umesh Thakur

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @sameryadav,

First of all your requirement, to use AEM as Oauth token is seems to be not good. So you need to update it.

Since AEM is a CMS tool to keep it like that only, So What can you do in your requirement is simply create some OSGI configuration to configure client_id, client_secret and fallback_urls etc. then while making a call to salesforce use those fields for authorisation.

I think salesforce has rich support for Rest API Authorisation.

Please see the below URL:

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm

 

Hope this will help.

Umesh Thakur