We have our own authentication system which we use for authenticating a user. If auth is successful, we return a token against the user, which the client can send in API(s) which require authorization.
In our system, now, we are planning to integrate a chat system using ejabberd. Since, we already have an authentication service, we plan to use the same for external authentication in ejabberd.
We want to send token to ejabberd and let external authentication service authenticate against it. We have implemented the same. But, we are facing an issue : Second time, when client sends login request, we are getting Invalid username / password from ejabberd.
We also want to understand if we can modify registration / login request (using some hook) so that we can create a default password for each user and authenticate the user against that.
Please let us know if you need any further details.