Closed sheuertz closed 6 years ago
Hi,
Sorry it took so long to answer. I suppose you found a solution by now, but I will post this anyway to help future users.
The HS256 key attribute was expecting a base64 encoded key. This was not very well documented. I just changed this behaviour:
Before
jwtauth_key: "U0VDUkVU" # Base64 encoded key
jwtauth_strict_alg: "HS256"
Now:
auth_method: jwt
modules:
ejabberd_auth_jwt:
key: "SECRET"
strict_alg: "HS256"
Hi,
I'm trying to incorporate your module into ejabberd. It shows as installed, and the auth_mode is set to jwt. To test the connection, I'm using a simple JWT created on http://jwtbuilder.jamiekurtz.com/. I'm just using the HS256 default secret on that site when generating the JWT.
I am trying to connect using Pidgin. I set the username to match the sub claim, and the password to the token, but when it tries to connect, I get an Invalid username or password message.
I can see in the log that the token is getting to the server, but I can't tell if the jwt auth module is being used to authenticate. Is there any guidance you can give if I'm doing something wrong based on the above?