1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-27 19:52:18 -05:00

Merge commit 'refs/pull/585/head' of https://github.com/xsf/xeps into feature/xep-0401

This commit is contained in:
Jonas Wielicki 2018-03-04 16:34:07 +01:00
commit 3892030c27

View File

@ -30,6 +30,16 @@
<firstname>Marc</firstname>
<surname>Schink</surname>
</author>
<revision>
<version>0.2.0</version>
<date>2018-02-11</date>
<initials>ms</initials>
<remark>
<p>Used Data Forms for extension of In-Band Registration as required by <strong>XEP-0077</strong> § 4.</p>
<p>Added "defined condition" elements in error stanzas as required by <strong>RFC 6120</strong> § 8.3.2.</p>
<p>Changed type of "invalid-token" error to "modify".</p>
</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2018-01-25</date>
@ -325,35 +335,70 @@
<p>If the server supports and is ready to perform Pre-Authenticated IBR,
it MUST add a &lt;token&gt; element to the response (TODO: 'token' or
'preauth'?):</p>
<example caption="Receiving registration fields"><![CDATA[
<example caption="Receiving registration form"><![CDATA[
<iq type='result' to='romeo@example.com' from='example.com' id='reg1'>
<query xmlns='jabber:iq:register'>
<username/>
<password/>
<token/>
<x xmlns='jabber:x:data' type='form'>
<field type='hidden' var='FORM_TYPE'>
<value>urn:xmpp:invite:0</value>
</field>
<field type='text-single' label='Username' var='username'>
<required/>
</field>
<field type='text-private' label='Password' var='password'>
<required/>
</field>
<field type='text-single' label='Invite token' var='token'>
<required/>
</field>
</x>
</query>
</iq>
]]></example>
<example caption='Registration process aborted (invalid token)'><![CDATA[
<example caption='Receiving registration form with error (invalid token)'><![CDATA[
<iq type='error' from='example.com' id='reg1'>
<query xmlns='jabber:iq:register'>
<username>juliet</username>
<password>m1cro$oft</password>
<token>BADTOKEN</token>
<x xmlns='jabber:x:data' type='form'>
<field type='hidden' var='FORM_TYPE'>
<value>urn:xmpp:invite:0</value>
</field>
<field type='text-single' var='username'>
<value>juliet<value/>
</field>
<field type='text-private' var='password'>
<value>m1cro$oft<value/>
</field>
<field type='text-single' var='token'>
<value>BADTOKEN<value/>
</field>
</x>
</query>
<error type='cancel'>
<error type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<invalid-token xmlns='urn:xmpp:invite:0'/>
</error>
</iq>
]]></example>
<example caption='Registration process aborted (token expired)'><![CDATA[
<example caption='Receiving registration form with error (token expired)'><![CDATA[
<iq type='error' from='example.com' id='reg1'>
<query xmlns='jabber:iq:register'>
<username>juliet</username>
<password>m1cro$oft</password>
<token>OLDTOKEN</token>
<x xmlns='jabber:x:data' type='form'>
<field type='hidden' var='FORM_TYPE'>
<value>urn:xmpp:invite:0</value>
</field>
<field type='text-single' var='username'>
<value>juliet<value/>
</field>
<field type='text-private' var='password'>
<value>m1cro$oft<value/>
</field>
<field type='text-single' var='token'>
<value>OLDTOKEN<value/>
</field>
</x>
</query>
<error type='cancel'>
<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<token-expired xmlns='urn:xmpp:invite:0'/>
</error>
</iq>