1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-28 12:12:22 -05:00

XEP-0389: better describe the type attribute

This commit is contained in:
Sam Whited 2020-04-22 10:43:13 -04:00
parent dd9383527b
commit a6a2942129

View File

@ -166,8 +166,8 @@
</p> </p>
<p> <p>
For recovery or registration, the server MUST include a list of all For recovery or registration, the server MUST include a list of all
challenge types which the client may receive during the course of challenges which the client may receive during the course of registering or
registering or recovering an account. recovering an account.
These are grouped into "flows" and let the client pick a registration These are grouped into "flows" and let the client pick a registration
workflow that only contains challenges which the client supports. workflow that only contains challenges which the client supports.
Each &lt;flow/&gt; element MUST have a unique "id" attribute which is used Each &lt;flow/&gt; element MUST have a unique "id" attribute which is used
@ -182,7 +182,7 @@
representing the various challenges that must be completed to complete the representing the various challenges that must be completed to complete the
registration or recovery flow. registration or recovery flow.
Each &lt;challenge/&gt; element contains a string that uniquely (within the Each &lt;challenge/&gt; element contains a string that uniquely (within the
given parent element) identifies the type of challenge that will be offered. given parent element) identifies the challenge that will be offered.
If a flow would offer the same challenge twice (eg. two dataforms asking for If a flow would offer the same challenge twice (eg. two dataforms asking for
different data), the challenge SHOULD only be listed once in the flow different data), the challenge SHOULD only be listed once in the flow
element. element.
@ -264,12 +264,10 @@
If replying to an IQ, the challenge must be wrapped in an IQ of type If replying to an IQ, the challenge must be wrapped in an IQ of type
"result". "result".
Challenges take the form of a &lt;challenge/&gt; element qualified by the Challenges take the form of a &lt;challenge/&gt; element qualified by the
'urn:xmpp:register:0' namespace with a 'type' attribute containing the 'urn:xmpp:register:0' namespace with a 'type' attribute that uniquely
challenge type and containing a challenge data payload. identifies the type of payload a client might expect the element to contain.
</p> </p>
<p> <p>
Type type of a challenge is a value which identifes what sort of payload a
client might expect.
This document defines a type of 'jabber:x:data' which MUST always contain a This document defines a type of 'jabber:x:data' which MUST always contain a
data form (an 'x' element with type 'form') as defined by &xep0004;. data form (an 'x' element with type 'form') as defined by &xep0004;.
Other types may be defined in the future. Other types may be defined in the future.
@ -304,8 +302,8 @@
sending a &lt;response/&gt; element qualified by the 'urn:xmpp:register:0' sending a &lt;response/&gt; element qualified by the 'urn:xmpp:register:0'
namespace or a cancellation as defined later in this document. namespace or a cancellation as defined later in this document.
If the client sends a response, it MUST also include a payload defined by If the client sends a response, it MUST also include a payload defined by
the specific challenge type. the challenges 'type' element.
In the case of a jabber:x:data challenge, the payload should be a form In the case of a "jabber:x:data" challenge, the payload should be a form
submission as defined by &xep0004; (an 'x' element of type 'submit'). submission as defined by &xep0004; (an 'x' element of type 'submit').
For instance, to reply to the data form challenge from the previous example For instance, to reply to the data form challenge from the previous example
a client might send: a client might send:
@ -438,16 +436,16 @@
<status>provisional</status> <status>provisional</status>
</ns>]]></code> </ns>]]></code>
</section2> </section2>
<section2 topic='IBR Challenge Types Registry' anchor='registrar-challenges'> <section2 topic='IBR Challenges Registry' anchor='registrar-challenges'>
<p> <p>
The XMPP Registrar shall maintain a registry of IBR challenge types. The XMPP Registrar shall maintain a registry of IBR challenges.
Challenge types defined within the XEP series MUST be registered with the Challenges defined within the XEP series MUST be registered with the XMPP
XMPP Registrar. Registrar.
</p> </p>
&REGPROCESS; &REGPROCESS;
<code><![CDATA[ <code><![CDATA[
<challenge> <challenge>
<name>The name of the challenge (from the initial <challenge/> listing).</name> <type>A name that uniquely identifies the challenge.</type>
<desc>A natural-language summary of the challenge.</desc> <desc>A natural-language summary of the challenge.</desc>
<doc> <doc>
The doucment (or documents) in which the IBR challenge and its paylaod are The doucment (or documents) in which the IBR challenge and its paylaod are
@ -459,18 +457,18 @@
</p> </p>
</section2> </section2>
<section2 topic='Challenge Types' anchor='registrar-ibrchallenges'> <section2 topic='Challenge Types' anchor='registrar-ibrchallenges'>
<p>This specification defines the following IBR challenge types:</p> <p>This specification defines the following IBR challenge:</p>
<ul> <ul>
<li>jabber:x:data</li> <li>jabber:x:data</li>
</ul> </ul>
<p> <p>
Upon advancement of this specification from a status of Experimental to a Upon advancement of this specification from a status of Experimental to a
status of Draft, the &REGISTRAR; shall add the following definition to the status of Draft, the &REGISTRAR; shall add the following definition to the
IBR challenge types registry, as described in this document: IBR challenges registry, as described in this document:
</p> </p>
<code caption='Challenge Type Registry Submission for Data Forms'><![CDATA[ <code caption='IBR Challenges Registry Submission for Data Forms'><![CDATA[
<challenge> <challenge>
<name>jabber:x:data</name> <type>jabber:x:data</type>
<desc>Requests that the client fill out an XEP-0004 data form.</desc> <desc>Requests that the client fill out an XEP-0004 data form.</desc>
<doc>&xep0389;, &xep0004;</doc> <doc>&xep0389;, &xep0004;</doc>
</challenge>]]></code> </challenge>]]></code>