AEM as Oauth client for external Oauth provider | Community
Skip to main content
Level 4
September 5, 2021
Solved

AEM as Oauth client for external Oauth provider

  • September 5, 2021
  • 1 reply
  • 710 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Umesh_Thakur

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

 

1 reply

Umesh_Thakur
Community Advisor
Umesh_ThakurCommunity AdvisorAccepted solution
Community Advisor
September 6, 2021

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