Expand my Community achievements bar.

SOLVED

Custom authentication in AEM

Avatar

Level 1

I have a need to build secure pages on a website by integrating with an external identity system. The external IDP has its own login page and it will redirect to AEM secure page after successful login after setting an identity cookie. I want to use this external login to establish authenticated session in AEM so that I can use AEM ACLs and permission handling. However, I do not want to sync users in AEM and may be just use a single pre-created user(with right group mappings) to login in AEM.I will validate the cookie with external IDP before I create a session in AEM with pre-created user. How can I achieve this ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

We also implemented the same with cug and external IDP login page.

1. we have a filter to redirect the user to the login page if the page is protected and the user is not logged in

2. for cached pages, we use permission sensitive caching to check if page access.

3. used token service to create a user in aem and added group received from external identity server, created aem session and created few cookies to store user/session related data.



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

We also implemented the same with cug and external IDP login page.

1. we have a filter to redirect the user to the login page if the page is protected and the user is not logged in

2. for cached pages, we use permission sensitive caching to check if page access.

3. used token service to create a user in aem and added group received from external identity server, created aem session and created few cookies to store user/session related data.



Arun Patidar