In-Band Registration improvements

Submitted by Anonymous on Fri, 2010-07-16 03:54

Hey Artur,

for my application needs, I have to proceed to a more complete registration than just username / password, so I implemented the support for custom registration form (XEP-0077 - 4. Extensibility).

The form provider is pluggable through Tigase configuration. I'd be glad to submit you the changes.

Secondly, in our application, we use a custom UserAuthRepository, and we need more informations to create users (some infos provided by the custom form), so I'd like to propose a new method for the UserAuthRepository.

void tigase.db.UserAuthRepository.addUser(BareJID user, String password, Map reg_params) throws UserExistsException, TigaseDBException

Whose default implementation should simply ignore "reg_params" and fall back to addUser(user, password) :
void addUser(BareJID user, String password, Map reg_params) throws UserExistsException, TigaseDBException {
addUser(user, password);
}

So the addition of this method is fully backward compatible and would allow more extensibility through the reg_params map. This map should be considered as "in-out", the UserAuthRepository may consume or add params during the registration process.

If these changes are fine from your standpoint I could send you a patch over the weekend.

Regards,

- nicolas

Artur Hefczyc's picture

Yes these changes seems like

Yes these changes seems like a good idea and I would be happy to apply them to the current development branch. Please send me patches whenever you can.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.