Project

General

Profile

JabberIqAuth plugin not being called/used

Gureen Ryuu
Added over 4 years ago

Hello all.

I'm trying to do a custom login plugin by extending overriding JabberIqAuth with my own plugin, because I want to send the user a custom message depending on the account status. However, after I've installed the plugin, I found out that it's not being called, and neither is the original JabberIqAuth when I check the tigase logs.

The only thing I've found after searching was that the JabberIqAuth isn't used, but rather, the tigase-custom-authenticator ( http://www.tigase.org/content/tigase-custom-auth-connector ) is actually used, and this would require me to change the server and recompile it to be able to send custom messages in reply to the authentication, instead of using a plugin. Is there any way to get around that, and use the custom JabberIqAuth instead?


Replies (4)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

First of all - please tell us what are you trying to achieve, what custom status?

Back to the issue above - you mix to things - authentication protocol (JAbberIqAuth) with authentication mechanism within Tigase. The former is considered now deprecated but is still available for compatibility purposes. Currently by default SASL authentication is being used.

Tigase-custom-auth is only an authentication connector which performs verification whether user provided correct credentials (and it's completely transparent as to how those credentials were sent to tigase).

Added by Gureen Ryuu over 4 years ago

I'm trying to send the user a custom message when he tries to login, but fails because his account_status is not 1, instead of the default message that is sent by default. For example, for account_status -1, if the user speaks french, I want to send him a message in french telling him to go our website and renew his account. If he speaks german, send it in german, etc.. If account_status is -2, send a different message.

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Account status is yet another story, but if you are fine with simple 'authenticated' / 'not authenticated' then you should also look at tigase.xmpp.impl.SaslAuth plugin and make necessary adjustments to sasl processing as well.

Added by Gureen Ryuu over 4 years ago

Wojciech Kapcia wrote:

Account status is yet another story, but if you are fine with simple 'authenticated' / 'not authenticated' then you should also look at tigase.xmpp.impl.SaslAuth plugin and make necessary adjustments to sasl processing as well.

I see. Yes, I only need to know if the user managed to get authenticated or not. I will look it up then! Thank you :)

    (1-4/4)