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.
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)>
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
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>.
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.
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".
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
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.
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).
<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.
<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.
The user can then send the invitation to the contact in an XMPP message stanza:
<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>
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.
<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.
To follow.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [8].
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].
<?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>
Thanks to Dave Cridland for his suggestions. Aspects of this specification were inspired by RFC 4467 [11].
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>.
Initial published version.
(psa)First draft.
(psa)END