Try it
Try it

Reputation: 315

CQ Login with own messages

Is it possible to programm an own servlet to login in CQ System and return the own message as JSON responses.

I mean the same as the J_Security_Check do, but that I have the control of the messages. Login should check credentials and create token for the session.

I don't found any helpful solution in the internet.

Does somebody know how I can do that?

Are there any classes in AEM to help in this situation?

I use AEM 6.1.

Upvotes: 1

Views: 1091

Answers (3)

Abhishek
Abhishek

Reputation: 1190

You will need to override AEM's login component present at /libs/granite/core/content/login by copying this component under /apps maintaining the same folder structure (type of various folders in the heriarchy). This component's resource is present at /libs/granite/core/components/login which contains the JSP script for AEM's login form. Once you've moved all the relevant scripts to /apps, you can modify the login form's action in login.jsp to point to your servlet path.

The call to server is submitted from /libs/granite/core/content/login/clientlib/login.js using Jquery, you can handle the response from your servlet in the appropriate success/error blocks.

Other than this, there is an OSGI setting which is used by AEM for rendering the login page. Find the Day CQ Login Selector Authentication Handler setting in Felix console and change the Default Login Page to your component under /apps.

Upvotes: 0

Tuhin Ghosh
Tuhin Ghosh

Reputation: 21

try looking at LDAP with SAML2 authentication options. https://helpx.adobe.com/experience-manager/kb/saml-demo.html

Upvotes: 0

Related Questions