Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 56 lines (37 sloc) 1.282 kb
bd909905 »
2012-01-05 initial commit
1 # node-xmpp-serviceadmin
2
3 Jabber Service Administration
4 [XEP-0133](http://xmpp.org/extensions/xep-0133.html) library for
5 [node-xmpp](https://github.com/astro/node-xmpp).
6
d8ce1957 »
2012-02-26 added build status image
7 [![Build Status](https://secure.travis-ci.org/flosse/node-xmpp-serviceadmin.png)](http://travis-ci.org/flosse/node-xmpp-serviceadmin)
8
bd909905 »
2012-01-05 initial commit
9 ## Installation
10
11 With package manager [npm](http://npmjs.org/):
12
13 npm install node-xmpp-serviceadmin
14
15 ## Usage
16
17 ```coffeescript
18 xmpp = require "node-xmpp"
19 sa = require "node-xmpp-serviceadmin"
20
21 # define the host
22 service = "example.org"
23
24 # define the JID that has the admin privileges
25 root = "root@mycomponent.example.org"
26
27 # creat the xmpp connection
28 comp = new xmpp.Component
29 jid : "mycomponent"
30 password : "secret"
31 host : "127.0.0.1"
32 port : "8888"
33
34 serviceAdmin = new sa.ServieAdmin root, comp, service
35
36 # creating a new user
37 serviceAdmin.addUser "jid@example.org", "secret", { name: "Der Weihnachtsmann" }, (err) ->
38
39 # changing a user password
40 serviceAdmin.changeUserPassword "jid@example.org", "newSecret", (err) ->
41
42 # delete a user
43 serviceAdmin.deleteUser "jid@example.org", (err) ->
44 ```
45
46 ## Running tests
47
48 ```shell
49 jasmine-node --coffee spec/
50 ```
51
52 ## License
53
54 node-xmpp-serviceadmin is licensed under the MIT-Licence
55 (see LICENSE.txt)
Something went wrong with that request. Please try again.