Oauth2 authentication support in ejabberd

I am currently looking at how I can use my oauth2 token from our own authentication application using ejabberd.

Is there an affordable solution that allows me to authenticate in our own product, and then use this aauth2 JWT token for authentication with ejabberd.

Or maybe another question is how to synchronize ejabberd users with users of my own applications.

I am looking for one sign for the work of our users.

I saw suggestions to update the ejabberd user password with the token generated at every login. and then just log in to ejabberd using the username and token. This, however, sounds more than a hack, and then a real solution.

Does anyone have any experience? I have no experience with Erlan. It would be great if someone could point me in the right direction.

+4
source share
1 answer

I see two basic correct ways to implement token-based authentication for ejabberd:

  • Special ejabberd authentication module: you can write your own authentication module for ejabberd using the ejabberd API You can use one of the existing Erlang ejabberd_auth*.erlas an example.

  • Use a contribution that allows you to authenticate to the HTTP server and perform token verification in this backend. This will eliminate the need to write Erlang code. Such a module is available on ProcessOne Github: ejabberd_auth_http .

+3

All Articles