strope 在 ejabberdctl 上注册用户

发布于 2024-09-30 03:00:27 字数 138 浏览 1 评论 0原文

我想使用 strope 在 ejabberd 服务器上添加用户,而无需在命令提示符下键入 ejabberdctl register unameservename passwd 。是否可以实施?有没有 XMPP协议是否存在用于注册用户?

谢谢 沙蒂

I would like to add a user on ejabberd server using strophe with out typing ejabberdctl register uname servename passwd at command prompt. Is it possible to implement?. Is there any
XMPP protocol exists to register an user?

Thanks
Sathi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

弄潮 2024-10-07 03:00:27

是的,有可能......您需要允许在服务器上进行内联注册。完成后,您当然可以从任何客户端或客户端库(包括 strope.js)执行此操作。

Yes it is possible... you need to allow for inline registration on the server. Once that's done, you can certainly do it from any client or client library, include strophe.js.

护你周全 2024-10-07 03:00:27

使用 mod_admin_extra 和 mod_rest 然后您可以完全轻松地访问 jabberctl + 一些额外的命令。搜索模块文档以获取有关如何设置的更多信息。

Use mod_admin_extra and mod_rest then you get a full restfull access to jabberctl + some extra commands. Search the module documentation for more information on how to set this up.

蝶舞 2024-10-07 03:00:27

我正在使用 strope.register.js

$("#register").click(function () {              

    var connect = new Strophe.Connection('http://yourserver.com/http-bind');

    var callback = function (status) {

        if ( status === Strophe.Status.REGISTERING ) {
            console.log('REGISTERING')
        }

        else if ( status === Strophe.Status.REGIFAIL ) {
            console.log('REGIFAIL')
        }

        else if ( status === Strophe.Status.REGISTER ) {
            console.log('REGISTER')
            connect.register.fields.username = "joe"
                    connect.register.fields.password = "doe"
                    connect.register.submit();
        }

        else if ( status === Strophe.Status.SUBMITTING ) {
            console.log('SUBMITTING')
        }

        else if ( status === Strophe.Status.SBMTFAIL ) {
            console.log('SBMTFAIL')
            console.log('Something went wrong...');
        }

        else if ( status === Strophe.Status.REGISTERED ) {
            console.log('REGISTERED')

            console.log('Your account has been created successfully and is ready to use!');

        }

    }   

connect.register.connect("yourserver.com", callback);

});

I am using strophe.register.js

$("#register").click(function () {              

    var connect = new Strophe.Connection('http://yourserver.com/http-bind');

    var callback = function (status) {

        if ( status === Strophe.Status.REGISTERING ) {
            console.log('REGISTERING')
        }

        else if ( status === Strophe.Status.REGIFAIL ) {
            console.log('REGIFAIL')
        }

        else if ( status === Strophe.Status.REGISTER ) {
            console.log('REGISTER')
            connect.register.fields.username = "joe"
                    connect.register.fields.password = "doe"
                    connect.register.submit();
        }

        else if ( status === Strophe.Status.SUBMITTING ) {
            console.log('SUBMITTING')
        }

        else if ( status === Strophe.Status.SBMTFAIL ) {
            console.log('SBMTFAIL')
            console.log('Something went wrong...');
        }

        else if ( status === Strophe.Status.REGISTERED ) {
            console.log('REGISTERED')

            console.log('Your account has been created successfully and is ready to use!');

        }

    }   

connect.register.connect("yourserver.com", callback);

});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文