util.x509: Nameprep commonName once
[prosody.git] / spec / scansion / muc_password.scs
blob8261118346aeee8b835ef63fbf2b2a3730ca80b2
1 # MUC: Password-protected rooms
3 [Client] Romeo
4         jid: user@localhost
5         password: password
7 [Client] Juliet
8         jid: user2@localhost
9         password: password
11 -----
13 Romeo connects
15 Romeo sends:
16         <presence to="room@conference.localhost/Romeo">
17                 <x xmlns="http://jabber.org/protocol/muc"/>
18         </presence>
20 Romeo receives:
21         <presence from='room@conference.localhost/Romeo'>
22                 <x xmlns='http://jabber.org/protocol/muc#user'>
23                         <status code='201'/>
24                         <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
25                         <status code='110'/>
26                 </x>
27         </presence>
29 Romeo receives:
30         <message type='groupchat' from='room@conference.localhost'><subject/></message>
32 # Submit config form
33 Romeo sends:
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>
39                                 </field>
40                                 <field var='muc#roomconfig_roomsecret'>
41                                         <value>cauldronburn</value>
42                                 </field>
43                         </x>
44                 </query>
45         </iq>
47 Romeo receives:
48         <iq id="config1" from="room@conference.localhost" type="result">
49         </iq>
51 # Juliet connects, and tries to join the room (password-protected)
52 Juliet connects
54 Juliet sends:
55         <presence to="room@conference.localhost/Juliet">
56                 <x xmlns="http://jabber.org/protocol/muc"/>
57         </presence>
59 Juliet receives:
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'/>
63                 </error>
64         </presence>
66 # Retry with the correct password
67 Juliet sends:
68         <presence to="room@conference.localhost/Juliet">
69                 <x xmlns="http://jabber.org/protocol/muc">
70                         <password>cauldronburn</password>
71                 </x>
72         </presence>
74 Juliet receives:
75         <presence from="room@conference.localhost/Romeo" />
77 Juliet receives:
78         <presence from="room@conference.localhost/Juliet" />
80 Juliet receives:
81         <message type='groupchat' from='room@conference.localhost'><subject/></message>
83 Romeo receives:
84         <presence from="room@conference.localhost/Juliet" />
86 # Ok, now Juliet leaves, and Romeo unsets the password
88 Juliet sends:
89         <presence type="unavailable" to="room@conference.localhost"/>
91 Romeo receives:
92         <presence type="unavailable" from="room@conference.localhost/Juliet"/>
94 Juliet receives:
95         <presence type="unavailable" from="room@conference.localhost/Juliet"/>
97 # Remove room password
98 Romeo sends:
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>
104                                 </field>
105                                 <field var='muc#roomconfig_roomsecret'>
106                                 </field>
107                         </x>
108                 </query>
109         </iq>
111 # Config change success
112 Romeo receives:
113         <iq id="config2" from="room@conference.localhost" type="result">
114         </iq>
116 # Notification of room configuration update
117 Romeo receives:
118         <message type='groupchat' from='room@conference.localhost'>
119                 <x xmlns='http://jabber.org/protocol/muc#user'>
120                         <status code='104'/>
121                 </x>
122         </message>
124 # Juliet tries to join (should succeed)
125 Juliet sends:
126         <presence to="room@conference.localhost/Juliet">
127                 <x xmlns="http://jabber.org/protocol/muc"/>
128         </presence>
130 # Notification of Romeo's presence in the room
131 Juliet receives:
132         <presence from="room@conference.localhost/Romeo" />
134 Juliet receives:
135         <presence from="room@conference.localhost/Juliet" />
137 # Room topic
138 Juliet receives:
139         <message type='groupchat' from='room@conference.localhost'><subject/></message>
141 Romeo receives:
142         <presence from="room@conference.localhost/Juliet" />