XEP-xxxx: Multi-stage IBR

Abstract
This specification defines an augmentation of In-Band Registration to allow for multiple stages of user input.
Author
Stephen Paul Weber
Copyright
© 1999 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

ProtoXEP

WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.
Type
Standards Track
Version
0.0.1 (2016-02-03)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Draft
  4. Final

1. Introduction

When performing a registration using In-Band Registration (XEP-0077) [1], multiple steps are sometimes needed so that the Host may ask questions based on information provided. This specification defines an augmentation to XEP-0077 for this purpose.

2. Requirements

Multi-stage IBR must make it possible for a host to ask for further information in response to an initial registration request. It must be usable with clients that only support XEP-0077, though possibly with a degraded user experience.

3. Use Cases

3.1 Entity Registers with a Host

This use case is identical to one in XEP-0077, except that it allows the Host to request further fields after an initial submission. The examples have been altered to demonstrate one such case. Errors are reported in the same way as XEP-0077, these examples show only a successful case.

In order to determine which fields are required for registration with a host, an entity SHOULD first send an IQ get to the host. The entity SHOULD NOT attempt to guess at the required fields by first sending an IQ set, since the nature of the required data is subject to service provisioning.

Example 1. Entity Requests Registration Fields from Host
<iq type='get' id='reg1' to='sms.shakespeare.lit'>
  <query xmlns='jabber:iq:register'/>
</iq>
    
Example 2. Host Returns Registration Fields to Entity
<iq type='result' id='reg1'>
  <query xmlns='jabber:iq:register'>
    <instructions>
      Enter your phone number for verification
    </instructions>
    <phone/>
  </query>
</iq>
    
Example 3. Entity Provides Required Information
<iq type='set' id='reg2'>
  <query xmlns='jabber:iq:register'>
    <phone>15550000</phone>
  </query>
</iq>
    

Note: The requesting entity MUST provide information for all of the elements (other than <instructions/>) contained in the IQ result.

Example 4. Host Informs Entity of More Fields Needed
<iq type='result' id='reg2'>
   <query xmlns='jabber:iq:register'>
     <instructions>
       Enter the code you received via SMS
     </instructions>
     <password/>
   </query>
</iq>
    

If the host requires additional information above and beyond the data elements specified in the schema, it SHOULD use Data Forms as described in the Extensibility section of XEP-0077.

Example 5. Entity Provides Further Information
<iq type='set' id='reg3'>
   <query xmlns='jabber:iq:register'>
     <password>123456</password>
   </query>
</iq>
    
Example 6. Host Informs Entity of Successful Registration
<iq type='result' id='reg3'/>
    

When no more fields are requested, the registration is complete.

3.2 Redirection

A given deployment MAY wish to redirect users to another medium (e.g., a website) for further stages of registration, rather than allowing in-band registration. The recommended approach is to include only the <instructions/> element rather than the required fields or a data form in the IQ result, as well as a URL encoded using Out-of-Band Data (XEP-0066) [2]

Example 7. Host Redirects Entity to Web Registration
<iq type='result'
    from='sms.shakespeare.lit'
    id='reg2'>
  <query xmlns='jabber:iq:register'>
    <instructions>
      To complete registration, visit https://www.shakespeare.lit/sms-verify
    </instructions>
    <x xmlns='jabber:x:oob'>
      <url>https://www.shakespeare.lit/sms-verify</url>
    </x>
  </query>
</iq>
  

3.3 Client Does Not Support Multi-stage Registration

To support clients that do not implement this specification, the Host SHOULD respond to a query for the registration fields according to what it still needs to know.

Example 8. Entity Requests Registration Fields from Host After One Stage
<iq type='get' id='reg3' to='sms.shakespeare.lit'>
  <query xmlns='jabber:iq:register'/>
</iq>
    
Example 9. Host Returns Registration Fields to Entity Based on Current Stage
<iq type='result' id='reg3'>
   <query xmlns='jabber:iq:register'>
     <instructions>
       Enter the code you received via SMS
     </instructions>
     <password/>
   </query>
</iq>
    

Hosts SHOULD expire partial registrations after a reasonable amount of time, after which such a query would return the initial fields again.

4. Security Considerations

No additional concerns over XEP-0077.

5. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [3].

6. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [4].


Appendices

Appendix A: Document Information

Series
XEP
Number
xxxx
Publisher
XMPP Standards Foundation
Status
ProtoXEP
Type
Standards Track
Version
0.0.1
Last Updated
2016-02-03
Approving Body
XMPP Council
Dependencies
XEP-0077
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED

This document in other formats: XML  PDF

Appendix B: Author Information

Stephen Paul Weber
Email
singpolyma@singpolyma.net
JabberID
singpolyma@singpolyma.net

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. XEP-0077: In-Band Registration <https://xmpp.org/extensions/xep-0077.html>.

2. XEP-0066: Out of Band Data <https://xmpp.org/extensions/xep-0066.html>.

3. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

4. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

  1. Version 0.0.1 (2016-02-03)

    First draft.

    spw

END