Custom Authentication Handler Problems.
Hi guys.
I'm new to CQ and I have some questions regarding authentication handlers.
First of all, let me describe the overall problem/solution:
We will be working in a site that has a complex social logic (not related to any of the current social sites). That's why we would use AEM to administer the site's contents and another system which will handle all the complex funcionality, which will be embedded on some pages of AEM (we will use apache to access this system as a subdomain of the mail AEM domain).
Since the logic will be on the other system, we plan to encapsulate the registration/user management on it, but still want some content of AEM be displayed regarding whether or not the user is logged in. So in order to share sessions, we plan to:
a) Delegate the username/password verification on the other system (implementing a Custom Login Module).
b) Implement a Custom Authentication Handler that extracts the credentials of a JAAS based form (which will then be authenticated in our Custom Login Module), and writes a cookie in the AEM domain (requesting part of its value to the external system via some Web Service) when the "authenticationSucceeded" method is called. This way the cookie will be shared to the external system since, as explained, it will be a subdomain of the current domain.
We were able to deploy the Custom Login Module, but we are having some troubles developing the authentication handler. We are using the embedded crx lite to create and build the bundle (but we end up installing it from the bundles console with level 15).
When we restart the server, the bundle is installed successfully and it appears as active. It evens raises a service:
Service ID 177 Types: org.apache.sling.auth.core.spi.AuthenticationHandler, org.apache.sling.auth.core.spi.AuthenticationFeedbackHandler
Service PID: XXX
Component Name: XXX
Component ID: 49
Description: XXX
Vendor: XX
But it does not appear on the authenticators screen (http://localhost:4502/system/console/slingauth), and its methods are never called. I´ve also looked at all the implementations of Custom Authentication Handlers that I could find (even ours is based on the Form Based Authentication Handler), but I can't seem to find where the problem is. Since I'm also new to Sling and OSGi, so there might be something I'm missing (I guess with the bundle construction).
Can you please help me with this?
Thanks in advance.