The goal is to trigger a UserAuthenticatedEvent when a user is authenticated as already did in com.xpn.xwiki.user.impl.xwiki.MyBasicAuthenticator and com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator in xwiki-platform.
See XWIKI-5826.