AEM - Deliver protected pages with Salesforce authentication | Community
Skip to main content
selvendranr9588
Level 2
March 28, 2021
Solved

AEM - Deliver protected pages with Salesforce authentication

  • March 28, 2021
  • 2 replies
  • 2553 views

-  Hello team,

 

Please suggest how to implement the below requirement in AEM as a cloud service.

 

1. Few pages in AEM should be protected and should be accessed only after authentication

2. When end users accessing the protected page they should be shown a Salesforce login page

3. Once users logs in successfully with their salesforce account, then the page should be shown.

 

Salesforce have the oAuth setup as mentioned in https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&type=5

 

I went through some of the docs related to AEM and salesforce integration but not getting the steps on how to achieve it. Any pointers or suggestions will be helpful

 

@1709464 @3182927 @8769336 @3102152 

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 arunpatidar

Hi, To achieve this you need to implement the custom login handler -

1. Creates a Sling Filter which initial salesforce login when the protected page is accessed, the requested page can be stored in cookie to redirect user to the page after login

2. When user is on the salesforce login page, defined a callback url which creates a login/session/or allow the user to the page based on salesforce login cookie/corresponding login cookie.

3. Once session is validated, allow user to access the page. 

You can achieve the same with the front end logic also. 

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
March 28, 2021

Hi, To achieve this you need to implement the custom login handler -

1. Creates a Sling Filter which initial salesforce login when the protected page is accessed, the requested page can be stored in cookie to redirect user to the page after login

2. When user is on the salesforce login page, defined a callback url which creates a login/session/or allow the user to the page based on salesforce login cookie/corresponding login cookie.

3. Once session is validated, allow user to access the page. 

You can achieve the same with the front end logic also. 

Arun Patidar
selvendranr9588
Level 2
March 29, 2021

Hi Arun,

 

So far I am looking into approach as mentioned in https://www.albinsblog.com/2020/05/social-login-with-linkedin-adobe-experience-manager-aem.html#.YGCkXK8zbIU

It is using LinkedIn Sign in and I am looking to do the same for Salesforce.

 

Please let me know your thoughts on this and how it is different from using Sling Filters.

Level 4
September 19, 2021

Hi @selvendranr9588 

i have similar requirement, wanted to check if yours was achieved with steps @arunpatidar shared