This week’s cross post is a recommendation from Joey Smith. When I pointed out that the article is from 2013, his response was “so what, it’s still what I use”. That’s good enough for me. At any rate, if you need to know how to create a custom Authentication Handler then Joey recommends reading Yogesh Upadhyay’s blog post “How to Create Custom Authentication Handler in CQ”. In it, he walks you through the process, including several code snippets, and where to go to configure your OSGI bundle. Just ignore the references to CQ. 🙂
For those not familiar with Authentication Handlers, these are the services which handle login. For example, when you log in as a user, a default handler knows how to look up your username and password in the JCR and validate the provided values. Sometimes, you might need to customize this – either by changing where Adobe Experience Manager looks to validate the password, or what side-effects might come as the result of a successful (or failed) authentication. SAML and OAuth are examples of the former, and an example of the latter might include something like counting failed password attempts or capturing last login time. In each of these cases, you will be providing a customized Authentication Handler.