1 # MUC: Password-protected rooms
16 <presence to="room@conference.localhost/Romeo">
17 <x xmlns="http://jabber.org/protocol/muc"/>
21 <presence from='room@conference.localhost/Romeo'>
22 <x xmlns='http://jabber.org/protocol/muc#user'>
24 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
30 <message type='groupchat' from='room@conference.localhost'><subject/></message>
34 <iq id='config1' to='room@conference.localhost' type='set'>
35 <query xmlns='http://jabber.org/protocol/muc#owner'>
36 <x xmlns='jabber:x:data' type='submit'>
37 <field var='FORM_TYPE'>
38 <value>http://jabber.org/protocol/muc#roomconfig</value>
40 <field var='muc#roomconfig_roomsecret'>
41 <value>cauldronburn</value>
48 <iq id="config1" from="room@conference.localhost" type="result">
51 # Juliet connects, and tries to join the room (password-protected)
55 <presence to="room@conference.localhost/Juliet">
56 <x xmlns="http://jabber.org/protocol/muc"/>
60 <presence from="room@conference.localhost/Juliet" type="error">
61 <error type="auth" code="401">
62 <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
66 # Retry with the correct password
68 <presence to="room@conference.localhost/Juliet">
69 <x xmlns="http://jabber.org/protocol/muc">
70 <password>cauldronburn</password>
75 <presence from="room@conference.localhost/Romeo" />
78 <presence from="room@conference.localhost/Juliet" />
81 <message type='groupchat' from='room@conference.localhost'><subject/></message>
84 <presence from="room@conference.localhost/Juliet" />
86 # Ok, now Juliet leaves, and Romeo unsets the password
89 <presence type="unavailable" to="room@conference.localhost"/>
92 <presence type="unavailable" from="room@conference.localhost/Juliet"/>
95 <presence type="unavailable" from="room@conference.localhost/Juliet"/>
97 # Remove room password
99 <iq id='config2' to='room@conference.localhost' type='set'>
100 <query xmlns='http://jabber.org/protocol/muc#owner'>
101 <x xmlns='jabber:x:data' type='submit'>
102 <field var='FORM_TYPE'>
103 <value>http://jabber.org/protocol/muc#roomconfig</value>
105 <field var='muc#roomconfig_roomsecret'>
111 # Config change success
113 <iq id="config2" from="room@conference.localhost" type="result">
116 # Notification of room configuration update
118 <message type='groupchat' from='room@conference.localhost'>
119 <x xmlns='http://jabber.org/protocol/muc#user'>
124 # Juliet tries to join (should succeed)
126 <presence to="room@conference.localhost/Juliet">
127 <x xmlns="http://jabber.org/protocol/muc"/>
130 # Notification of Romeo's presence in the room
132 <presence from="room@conference.localhost/Romeo" />
135 <presence from="room@conference.localhost/Juliet" />
139 <message type='groupchat' from='room@conference.localhost'><subject/></message>
142 <presence from="room@conference.localhost/Juliet" />