mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 23:28:51 -05:00
5d6f916f99
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1746 4b5297f7-1745-476d-ba37-a9c6900126ab
143 lines
7.2 KiB
XML
143 lines
7.2 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
|
%ents;
|
|
]>
|
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
|
<xep>
|
|
<header>
|
|
<title>Direct Invitations</title>
|
|
<abstract>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.</abstract>
|
|
&LEGALNOTICE;
|
|
<number>0235</number>
|
|
<status>Experimental</status>
|
|
<type>Standards Track</type>
|
|
<sig>Standards</sig>
|
|
<approver>Council</approver>
|
|
<dependencies>
|
|
<spec>XMPP Core</spec>
|
|
</dependencies>
|
|
<supersedes/>
|
|
<supersededby/>
|
|
<shortname>NOT YET ASSIGNED</shortname>
|
|
&stpeter;
|
|
<revision>
|
|
<version>0.1</version>
|
|
<date>2008-03-05</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Initial published version.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.0.1</version>
|
|
<date>2008-02-20</date>
|
|
<initials>psa</initials>
|
|
<remark><p>First draft.</p></remark>
|
|
</revision>
|
|
</header>
|
|
<section1 topic='Introduction' anchor='intro'>
|
|
<p>&xep0045; 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 &xep0016; 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 &xep0060; services or future collaboration services.</p>
|
|
</section1>
|
|
<section1 topic='Obtaining an Invitation' anchor='obtain'>
|
|
<p>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 &NSNOTE;.</p>
|
|
<example caption='Token request'><![CDATA[
|
|
<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>
|
|
]]></example>
|
|
<p>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.</p>
|
|
<example caption='Token response'><![CDATA[
|
|
<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>
|
|
]]></example>
|
|
<p>The syntax of the invitation is as follows.</p>
|
|
<ul>
|
|
<li>The 'expires' attribute defines a date and time when the invitation expires. Inclusion of this attribute is OPTIONAL. If included, it MUST be a DateTime as specified in &xep0082;.</li>
|
|
<li>The 'for' attribute defines the JabberID of the invitee. Inclusion of this attribute is REQUIRED.</li>
|
|
<li>The 'jid' attribute defines the JabberID of the service to which the invitee is being invited. Inclusion of this attribute is REQUIRED.</li>
|
|
<li>The XML character data of the <invitation/> element is the invitation token itself. The token MAY be generated according to any method deemed appropriate by the service implementation. It is RECOMMENED that the token be the hexadecimal representation of a Keyed-Hash Message Authentication Code (see &nistfips198a;) generated using the SHA256 hashing algorithm (see &nistfips180-2;), as described elsewhere in this document.</li>
|
|
</ul>
|
|
</section1>
|
|
<section1 topic='Sharing an Invitation' anchor='share'>
|
|
<p>The user can then send the invitation to the contact in an XMPP message stanza:</p>
|
|
<example caption='Sharing the invitation'><![CDATA[
|
|
<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>
|
|
]]></example>
|
|
</section1>
|
|
<section1 topic='Using an Invitation' anchor='use'>
|
|
<p>The contact then MUST then determine the identity of the service (via &xep0030;) so that it can determine how to use the invitation.</p>
|
|
<p>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.</p>
|
|
<example caption='Chatroom join with invitation'><![CDATA[
|
|
<presence from='hecate@shakespeare.lit/broom' to='darkcave@macbeth.shakespeare.lit/Hecate'
|
|
<invitation xmlns='urn:xmpp:tmp:invite'>
|
|
37c69b1cf07a3f67c04a5ef5902fa5114f2c76fe4a2686482ba5b89323075643
|
|
</invitation>
|
|
</iq>
|
|
]]></example>
|
|
<p>If the invitation is acceptable, the service will then allow the contact to enter the room.</p>
|
|
<p><em>Note: Detailed error flows will be added to a future version of this specification.</em></p>
|
|
</section1>
|
|
<section1 topic='Security Considerations' anchor='security'>
|
|
<p>To follow.</p>
|
|
</section1>
|
|
<section1 topic='IANA Considerations' anchor='iana'>
|
|
<p>This document requires no interaction with &IANA;.</p>
|
|
</section1>
|
|
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
|
<section2 topic='Protocol Namespaces' anchor='ns'>
|
|
<p>Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:invite"; upon advancement of this specification, the ®ISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.</p>
|
|
</section2>
|
|
</section1>
|
|
<section1 topic='XML Schema' anchor='schema'>
|
|
<code><![CDATA[
|
|
<?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>
|
|
]]></code>
|
|
</section1>
|
|
<section1 topic='Acknowledgements' anchor='ack'>
|
|
<p>Thanks to Dave Cridland for his suggestions. Aspects of this specification were inspired by &rfc4467;.</p>
|
|
</section1>
|
|
</xep>
|