spec/scansion/muc_password-trunk.scs
changeset 9293 decdaaf78f32
parent 9292 b5fc11475b5d
child 9294 329a670ae975
equal deleted inserted replaced
9292:b5fc11475b5d 9293:decdaaf78f32
     1 [Client] Romeo
       
     2 	jid: user@localhost
       
     3 	password: password
       
     4 
       
     5 [Client] Juliet
       
     6 	jid: user2@localhost
       
     7 	password: password
       
     8 
       
     9 -----
       
    10 
       
    11 Romeo connects
       
    12 
       
    13 Romeo sends:
       
    14 	<presence to="room@conference.localhost/Romeo">
       
    15 		<x xmlns="http://jabber.org/protocol/muc"/>
       
    16 	</presence>
       
    17 
       
    18 Romeo receives:
       
    19 	<presence from='room@conference.localhost/Romeo'>
       
    20 		<x xmlns='http://jabber.org/protocol/muc#user'>
       
    21 			<status code='201'/>
       
    22 			<item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
       
    23 			<status code='110'/>
       
    24 		</x>
       
    25 	</presence>
       
    26 
       
    27 Romeo receives:
       
    28 	<message type='groupchat' from='room@conference.localhost'><subject/></message>
       
    29 
       
    30 # Submit config form
       
    31 Romeo sends:
       
    32 	<iq id='config1' to='room@conference.localhost' type='set'>
       
    33 		<query xmlns='http://jabber.org/protocol/muc#owner'>
       
    34 			<x xmlns='jabber:x:data' type='submit'>
       
    35 				<field var='FORM_TYPE'>
       
    36 					<value>http://jabber.org/protocol/muc#roomconfig</value>
       
    37 				</field>
       
    38 				<field var='muc#roomconfig_roomsecret'>
       
    39 					<value>cauldronburn</value>
       
    40 				</field>
       
    41 			</x>
       
    42 		</query>
       
    43 	</iq>
       
    44 
       
    45 Romeo receives:
       
    46 	<iq id="config1" from="room@conference.localhost" type="result">
       
    47 	</iq>
       
    48 
       
    49 # Juliet connects, and tries to join the room (password-protected)
       
    50 Juliet connects
       
    51 
       
    52 Juliet sends:
       
    53 	<presence to="room@conference.localhost/Juliet">
       
    54 		<x xmlns="http://jabber.org/protocol/muc"/>
       
    55 	</presence>
       
    56 
       
    57 Juliet receives:
       
    58 	<presence from="room@conference.localhost/Juliet" type="error">
       
    59 		<error type="auth">
       
    60 			<not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
       
    61 		</error>
       
    62 	</presence>
       
    63 
       
    64 # Retry with the correct password
       
    65 Juliet sends:
       
    66 	<presence to="room@conference.localhost/Juliet">
       
    67 		<x xmlns="http://jabber.org/protocol/muc">
       
    68 			<password>cauldronburn</password>
       
    69 		</x>
       
    70 	</presence>
       
    71 
       
    72 Juliet receives:
       
    73 	<presence from="room@conference.localhost/Romeo" />
       
    74 
       
    75 Juliet receives:
       
    76 	<presence from="room@conference.localhost/Juliet" />
       
    77 
       
    78 Juliet receives:
       
    79 	<message type='groupchat' from='room@conference.localhost'><subject/></message>
       
    80 
       
    81 Romeo receives:
       
    82 	<presence from="room@conference.localhost/Juliet" />
       
    83 
       
    84 # Ok, now Juliet leaves, and Romeo unsets the password
       
    85 
       
    86 Juliet sends:
       
    87 	<presence type="unavailable" to="room@conference.localhost"/>
       
    88 
       
    89 Romeo receives:
       
    90 	<presence type="unavailable" from="room@conference.localhost/Juliet"/>
       
    91 
       
    92 Juliet receives:
       
    93 	<presence type="unavailable" from="room@conference.localhost/Juliet"/>
       
    94 
       
    95 # Remove room password
       
    96 Romeo sends:
       
    97 	<iq id='config2' to='room@conference.localhost' type='set'>
       
    98 		<query xmlns='http://jabber.org/protocol/muc#owner'>
       
    99 			<x xmlns='jabber:x:data' type='submit'>
       
   100 				<field var='FORM_TYPE'>
       
   101 					<value>http://jabber.org/protocol/muc#roomconfig</value>
       
   102 				</field>
       
   103 				<field var='muc#roomconfig_roomsecret'>
       
   104 				</field>
       
   105 			</x>
       
   106 		</query>
       
   107 	</iq>
       
   108 
       
   109 # Config change success
       
   110 Romeo receives:
       
   111 	<iq id="config2" from="room@conference.localhost" type="result">
       
   112 	</iq>
       
   113 
       
   114 # Notification of room configuration update
       
   115 Romeo receives:
       
   116 	<message type='groupchat' from='room@conference.localhost'>
       
   117 		<x xmlns='http://jabber.org/protocol/muc#user'>
       
   118 			<status code='104'/>
       
   119 		</x>
       
   120 	</message>
       
   121 
       
   122 # Juliet tries to join (should succeed)
       
   123 Juliet sends:
       
   124 	<presence to="room@conference.localhost/Juliet">
       
   125 		<x xmlns="http://jabber.org/protocol/muc"/>
       
   126 	</presence>
       
   127 
       
   128 # Notification of Romeo's presence in the room
       
   129 Juliet receives:
       
   130 	<presence from="room@conference.localhost/Romeo" />
       
   131 
       
   132 Juliet receives:
       
   133 	<presence from="room@conference.localhost/Juliet" />
       
   134 
       
   135 # Room topic
       
   136 Juliet receives:
       
   137 	<message type='groupchat' from='room@conference.localhost'><subject/></message>
       
   138 
       
   139 Romeo receives:
       
   140 	<presence from="room@conference.localhost/Juliet" />
       
   141