XEP-0235: Direct Invitations

This specification defines an XMPP extension for generating, requesting, and providing invitations, which can be used in the context of Multi-User Chat rooms and other services.


WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.


Document Information

Series: XEP
Number: 0235
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.1
Last Updated: 2008-03-05
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: NOT YET ASSIGNED
Wiki Page: <http://wiki.jabber.org/index.php/Direct Invitations (XEP-0235)>


Author Information

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/


Legal Notices

Copyright

This XMPP Extension Protocol is copyright (c) 1999 - 2008 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. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

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 out of the use or inability to use 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 may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

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

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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.

Conformance Terms

The following 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".


Table of Contents


1. Introduction
2. Obtaining an Invitation
3. Sharing an Invitation
4. Using an Invitation
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
    7.1. Protocol Namespaces
8. XML Schema
9. Acknowledgements
Notes
Revision History


1. Introduction

Multi-User Chat [1] includes a protocol for inviting a contact to a chatroom. That protocol results in the sending of an invitation from the chatroom to the contact (a "mediated invitation"), not from the inviting user to the contact (a "direct invitation"). Because use of Server-Based Privacy Rules [2] may result in blocking of XML stanzas from entities that are not in the contact's roster, mediated invitations may never be delivered to the contact. Therefore, this specification defines an XMPP extension that enables a user to directly send an invitation to a contact, thus routing around the blocking of mediated invitations. While the main use case for this protocol is multi-user chat, nothing in the protocol prevents it from being used to invite contacts to other types of services, such as Publish-Subscribe [3] services or future collaboration services.

2. Obtaining an Invitation

In order to obtain an invitation that can be directly sent to a contact, a user requests an invitation token from the relevant service. For example, let us imagine that the user <crone1@shakespeare.lit> wishes to invite the contact <hecate@shakespeare.lit> to the chatroom <darkcave@macbeth.shakespeare.lit>. The user would send the following request to the room (see Protocol Namespaces regarding issuance of one or more permanent namespaces).

Example 1. Token request

<iq from='crone1@shakespeare.lit/desktop'
    id='request1'
    to='darkcave@macbeth.shakespeare.lit'
    type='get'>
  <invitation 
      for='hecate@shakespeare.lit'
      xmlns='urn:xmpp:tmp:invite'/>
</iq>
  

If the room supports the direct invitation protocol and the user is allowed to invite contacts to the room, the room returns an invitation token to the user.

Example 2. Token response

<iq from='darkcave@macbeth.shakespeare.lit'
    id='request1'
    to='crone1@shakespeare.lit/desktop'
    type='result'>
  <invitation 
      expires='2007-02-21T23:59:59Z'
      for='hecate@shakespeare.lit'
      jid='darkcave@macbeth.shakespeare.lit'
      xmlns='urn:xmpp:tmp:invite'>
    37c69b1cf07a3f67c04a5ef5902fa5114f2c76fe4a2686482ba5b89323075643
  </invitation>
</iq>
  

The syntax of the invitation is as follows.

3. Sharing an Invitation

The user can then send the invitation to the contact in an XMPP message stanza:

Example 3. Sharing the invitation

<message from='crone1@shakespeare.lit/desktop' to='hecate@shakespeare.lit'>
  <invitation 
      expires='2007-02-21T23:59:59Z'
      for='hecate@shakespeare.lit'
      jid='darkcave@macbeth.shakespeare.lit'
      xmlns='urn:xmpp:tmp:invite'>
    37c69b1cf07a3f67c04a5ef5902fa5114f2c76fe4a2686482ba5b89323075643
  </invitation>
</message>
  

4. Using an Invitation

The contact then MUST then determine the identity of the service (via Service Discovery [7]) so that it can determine how to use the invitation.

In this example, the service is a multi-user chat service. Therefore if the contact wishes to join the designated chatroom, it will include the invitation in its join request.

Example 4. Chatroom join with invitation

<presence from='hecate@shakespeare.lit/broom' to='darkcave@macbeth.shakespeare.lit/Hecate'
  <invitation xmlns='urn:xmpp:tmp:invite'>
    37c69b1cf07a3f67c04a5ef5902fa5114f2c76fe4a2686482ba5b89323075643
  </invitation>
</iq>
  

If the invitation is acceptable, the service will then allow the contact to enter the room.

Note: Detailed error flows will be added to a future version of this specification.

5. Security Considerations

To follow.

6. IANA Considerations

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

7. XMPP Registrar Considerations

7.1 Protocol Namespaces

Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:invite"; upon advancement of this specification, the XMPP Registrar [9] shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [10].

8. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:tmp:invite'
    xmlns='urn:xmpp:tmp:invite'
    elementFormDefault='qualified'>

  <xs:element name='invitation'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='expires' type='xs:string' use='optional'/>
          <xs:attribute name='for' type='xs:string' use='optional'/>
          <xs:attribute name='jid' type='xs:string' use='optional'/>
          <xs:attribute name='node' type='xs:string' use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
  

9. Acknowledgements

Thanks to Dave Cridland for his suggestions. Aspects of this specification were inspired by RFC 4467 [11].


Notes

1. XEP-0045: Multi-User Chat <http://www.xmpp.org/extensions/xep-0045.html>.

2. XEP-0016: Server-Based Privacy Rules <http://www.xmpp.org/extensions/xep-0016.html>.

3. XEP-0060: Publish-Subscribe <http://www.xmpp.org/extensions/xep-0060.html>.

4. XEP-0082: XMPP Date and Time Profiles <http://www.xmpp.org/extensions/xep-0082.html>.

5. The Keyed-Hash Message Authentication Code (HMAC): Federal Information Processing Standards Publication 198 <http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf>.

6. Secure Hash Standard: Federal Information Processing Standards Publication 180-2 <http://csrc.nist.gov/publications/fips/fips180-2/fips186-2withchangenotice.pdf>.

7. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.

8. 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/>.

9. 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 <http://www.xmpp.org/registrar/>.

10. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.

11. RFC 4467: Internet Message Access Protocol (IMAP) - URLAUTH Extension <http://tools.ietf.org/html/rfc4467>.


Revision History

Version 0.1 (2008-03-05)

Initial published version.

(psa)

Version 0.0.1 (2008-02-20)

First draft.

(psa)

END