Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.1.0
Fetching contributors…

Cannot retrieve contributors at this time

file 53 lines (36 sloc) 1.147 kb

node-xmpp-serviceadmin

Jabber Service Administration XEP-0133 library for node-xmpp.

Installation

With package manager npm:

npm install node-xmpp-serviceadmin

Usage

xmpp  = require "node-xmpp"
sa    = require "node-xmpp-serviceadmin"

# define the host
service = "example.org"

# define the JID that has the admin privileges
root    = "root@mycomponent.example.org"

# creat the xmpp connection
comp = new xmpp.Component
  jid       : "mycomponent"
  password  : "secret"
  host      : "127.0.0.1"
  port      : "8888"

serviceAdmin = new sa.ServieAdmin root, comp, service

# creating a new user
serviceAdmin.addUser "jid@example.org", "secret", { name: "Der Weihnachtsmann" }, (err) ->

# changing a user password
serviceAdmin.changeUserPassword "jid@example.org", "newSecret", (err) ->

# delete a user
serviceAdmin.deleteUser "jid@example.org", (err) ->

Running tests

jasmine-node --coffee spec/

License

node-xmpp-serviceadmin is licensed under the MIT-Licence (see LICENSE.txt)

Something went wrong with that request. Please try again.