-
Notifications
You must be signed in to change notification settings - Fork 72
Plugin for Changing Password #94
Comments
Is there anything that one can do to help this along? |
You could write the plugin yourself, or contract someone to write it for you :) |
Thanks. Unfortunately, I'm not a coder, and am looking to get this set up for a loose collective. Guess I'll just wait to see if someone takes interest in it. |
You could always learn. ;) |
@melissanoelle I'd love to. Would looking at https://github.com/candy-chat/candy-plugins/blob/master/createroom/createroom.js be a good place to start? How do I find out what the "Candy.Core.Action.Jabber.Room.Join(roomJid, null)"-equivalent for changing the password should be? I searched through the "candy" repository for "password" and here's what I see: But given my non-existent knowledge of JS, going through core.js and core/event.js doesn't seem to provide me an answer. :-/ |
That's the spirit! 👍 Mmm, maybe, yeah. For this, you'd want something that pops up a modal (which CreateRoom does), and then has a form, and then something to handle the form. For changing the password, you'll probably want to look at what stanza the XMPP server is expecting you to send to change it. Having a read through something like this might help: http://xmpp.org/extensions/xep-0077.html#usecases-changepw You'd next want to look at one of the plugins that does something like Because Candy is built on top of Strophe.js, having a read through their docs will be helpful in understanding the Once you understand the idea of sending and receiving these XML stanzas back and forth between your client and your server, you could probably knock this out relatively quickly. 👍 |
@melissanoelle: Thanks so much. I'll try and get to this over the weekend. I'm using Prosody, and they have a very helpful community chatroom. I'll ask there if they can tell me about the correct IQ stanza that needs to be sent. After that, I'll check some existing plugins and see if I can put something together that might work. (I don't know any Javascript, so that might be a bit of an impediment, but I'll try.) Once I have that, I'll share it here for comments. |
The proper spec you're looking for is XEP-0077: In-Band Registration. Examples are contained therein. The example in the spec would be built and sent like this: var pwChangeRequest = $iq({
type: 'set',
to: 'shakespeare.lit'
})
.c('query', {xmlns: 'jabber:iq:register'})
.c('username').t('bill').up()
.c('password').t('newpass');
Candy.Core.getConnection().sendIQ(
pwChangeRequest,
function () {
console.log("Password change was successful.")
},
function (responseStanza) {
console.log("Password change failed.");
console.log(responseStanza);
}
); |
It would be useful to have a Candy plugin that allows a user to change their XMPP password via a web interface.
Currently I'm creating accounts for them with a default password, but would like to provide the ability to change their password.
The text was updated successfully, but these errors were encountered: