mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-22 09:12:19 -05:00
1.4rc2: editorial review
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2514 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
ed44aca5e9
commit
f382dbb720
45
xep-0012.xml
45
xep-0012.xml
@ -27,8 +27,8 @@
|
|||||||
&temas;
|
&temas;
|
||||||
&stpeter;
|
&stpeter;
|
||||||
<revision>
|
<revision>
|
||||||
<version>1.4rc1</version>
|
<version>1.4rc2</version>
|
||||||
<date>2008-11-13</date>
|
<date>2008-11-17</date>
|
||||||
<initials>psa</initials>
|
<initials>psa</initials>
|
||||||
<remark><p>Added use case for inclusion of last activity information in presence.</p></remark>
|
<remark><p>Added use case for inclusion of last activity information in presence.</p></remark>
|
||||||
</revision>
|
</revision>
|
||||||
@ -76,10 +76,10 @@
|
|||||||
</revision>
|
</revision>
|
||||||
</header>
|
</header>
|
||||||
<section1 topic='Introduction' anchor='intro'>
|
<section1 topic='Introduction' anchor='intro'>
|
||||||
<p>It is often helpful to know the time of the last activity associated with a entity. The canonical usage is to discover when a disconnected user last accessed the server. The 'jabber:iq:last' namespace provides a method for retrieving that information. The 'jabber:iq:last' namespace can also be used to discover when a connected user was last active on the server (i.e., the user's idle time) or to query servers and components about their current uptime.</p>
|
<p>It is often helpful to know the time of the last activity associated with a entity. The canonical usage is to discover when a disconnected user last accessed its server. The 'jabber:iq:last' namespace provides a method for retrieving that information. The 'jabber:iq:last' namespace can also be used to discover or publicize when a connected user was last active on the server (i.e., the user's idle time) or to query servers and components about their current uptime.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Protocol' anchor='protocol'>
|
<section1 topic='Protocol' anchor='protocol'>
|
||||||
<p>In order to request last activity information regarding another entity, the requesting entity shall send an &IQ; stanza of type "get" to the target entity, containing a &QUERY; element qualified by the 'jabber:iq:last' namespace:</p>
|
<p>In order to request last activity information regarding another entity, the requesting entity sends an &IQ; stanza of type "get" to the target entity, containing a &QUERY; element qualified by the 'jabber:iq:last' namespace:</p>
|
||||||
<example caption='Last Activity Query'><![CDATA[
|
<example caption='Last Activity Query'><![CDATA[
|
||||||
<iq from='romeo@montague.net/orchard'
|
<iq from='romeo@montague.net/orchard'
|
||||||
id='last1'
|
id='last1'
|
||||||
@ -97,10 +97,10 @@
|
|||||||
<query xmlns='jabber:iq:last' seconds='903'/>
|
<query xmlns='jabber:iq:last' seconds='903'/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>The requesting entity must interpret the IQ-result based on the responding entity's JID type in order to determine the meaning of the information. Specifically, the information means something different depending on whether the responding entity has a JID of the form 'host', 'user@host', or 'user@host/resource'. These differences are explained more fully below.</p>
|
<p>The requesting entity interprets the IQ-result based on the responding entity's JID type in order to determine the meaning of the information. Specifically, the information means something different depending on whether the responding entity is an account registered on an XMPP server (typically with a JID of the form <user@host> a connected or available resource associated with such an account (<user@host/resource> or an "always-on" XMPP server or service (<host> These differences are explained more fully below.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Offline User Query' anchor='offline'>
|
<section1 topic='Offline User Query' anchor='offline'>
|
||||||
<p>The primary usage of the 'jabber:iq:last' namespace is to find out how long ago a user logged out (and, additionally, what their status message was at that time). This primary usage assumes that the IQ-get is sent to a bare JID &BAREJID;. When used in this way, the &QUERY; element contained in the IQ-result has a 'seconds' attribute, which is the number of seconds that have passed since the user last logged out. In addition, the element MAY contain XML character data that specifies the status message of the last unavailable presence received from the user. An example is shown below:</p>
|
<p>The primary usage of the 'jabber:iq:last' namespace is to find out how long ago a user logged out (and, additionally, what their status message was at that time). This primary usage assumes that the IQ-get is sent to a bare JID &LOCALBARE;. When used in this way, the &QUERY; element contained in the IQ-result has a 'seconds' attribute, which is the number of seconds that have passed since the user last logged out. In addition, the element MAY contain XML character data that specifies the status message of the last unavailable presence received from the user. An example is shown below:</p>
|
||||||
<example caption='Last Activity Query'><![CDATA[
|
<example caption='Last Activity Query'><![CDATA[
|
||||||
<iq from='romeo@montague.net/orchard'
|
<iq from='romeo@montague.net/orchard'
|
||||||
id='last1'
|
id='last1'
|
||||||
@ -109,7 +109,7 @@
|
|||||||
<query xmlns='jabber:iq:last'/>
|
<query xmlns='jabber:iq:last'/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>As specified in &xmppcore; and &xmppim;, an IQ stanza of type "get" sent to a bare JID &LOCALBARE; is handled by the user's server on the user's behalf, not delivered to one or more active resources.</p>
|
<p>As specified in &xmppcore; and &xmppim;, an IQ stanza of type "get" sent to a bare JID &LOCALBARE; is handled by the user's server on the user's behalf, not delivered to one or more connected or available resources.</p>
|
||||||
<p>If the requesting entity is not authorized to view the user's presence information (normally via a presence subscription as defined in <cite>XMPP-IM</cite>), the user's server MUST NOT return last activity information but instead MUST return a &forbidden; error in response to the last activity request.</p>
|
<p>If the requesting entity is not authorized to view the user's presence information (normally via a presence subscription as defined in <cite>XMPP-IM</cite>), the user's server MUST NOT return last activity information but instead MUST return a &forbidden; error in response to the last activity request.</p>
|
||||||
<example caption='Requesting Entity is Not Authorized to Retrieve Last Activity Information'><![CDATA[
|
<example caption='Requesting Entity is Not Authorized to Retrieve Last Activity Information'><![CDATA[
|
||||||
<iq from='juliet@capulet.com'
|
<iq from='juliet@capulet.com'
|
||||||
@ -123,17 +123,23 @@
|
|||||||
]]></example>
|
]]></example>
|
||||||
<p>If the requesting entity is authorized to view the user's presence information, the server shall return information about the last presence activity recorded by the server for that user.</p>
|
<p>If the requesting entity is authorized to view the user's presence information, the server shall return information about the last presence activity recorded by the server for that user.</p>
|
||||||
<example caption='Last Activity Response by Server'><![CDATA[
|
<example caption='Last Activity Response by Server'><![CDATA[
|
||||||
<iq from='juliet@capulet.com' to='romeo@montague.net/orchard' type='result' id='last1'>
|
<iq from='juliet@capulet.com'
|
||||||
|
id='last1'
|
||||||
|
to='romeo@montague.net/orchard'
|
||||||
|
type='result'>
|
||||||
<query xmlns='jabber:iq:last' seconds='903'>Heading Home</query>
|
<query xmlns='jabber:iq:last' seconds='903'>Heading Home</query>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>In this example, the user logged out fifteen minutes and three seconds ago, and when they logged out they sent a presence stanza of type='unavailable' whose <status/> element contained the text "Heading Home".</p>
|
<p>In this example, the user logged out fifteen minutes and three seconds ago, and when they logged out they sent a presence stanza of type='unavailable' whose <status/> element contained the text "Heading Home".</p>
|
||||||
<p>If the user has at least one available resource when the server receives the request, the response SHOULD contain an empty <query/> element whose 'seconds' attribute is set to a value of '0'.</p>
|
<p>If the user has at least one connected or available resource when the server receives the request, the response MUST (subject to local security policies) contain an empty <query/> element whose 'seconds' attribute is set to a value of '0'.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Online User Query' anchor='online'>
|
<section1 topic='Online User Query' anchor='online'>
|
||||||
<p>A requesting entity may send a last activity query to a full JID &LOCALFULL;.</p>
|
<p>A requesting entity can send a last activity query to the "full JID" &LOCALFULL; of a connected or available resource associated with an account.</p>
|
||||||
<example caption='Last Activity Query Sent to Full JID'><![CDATA[
|
<example caption='Last Activity Query Sent to Full JID'><![CDATA[
|
||||||
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' type='get' id='last2'>
|
<iq from='romeo@montague.net/orchard'
|
||||||
|
id='last2'
|
||||||
|
to='juliet@capulet.com/balcony'
|
||||||
|
type='get'>
|
||||||
<query xmlns='jabber:iq:last'/>
|
<query xmlns='jabber:iq:last'/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
@ -149,7 +155,7 @@
|
|||||||
</error>
|
</error>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If the user's server delivers the IQ-get to one of the user's available resources, the user's client MAY respond with the idle time of the user (i.e., the last time that the user interacted with the client application).</p>
|
<p>If the user's server delivers the IQ-get to one of the user's available resources, the user's client MAY respond with the idle time of the user (i.e., the last time that a human user interacted with the client application).</p>
|
||||||
<example caption='Last Activity Response by Client'><![CDATA[
|
<example caption='Last Activity Response by Client'><![CDATA[
|
||||||
<iq from='juliet@capulet.com/balcony'
|
<iq from='juliet@capulet.com/balcony'
|
||||||
id='last2'
|
id='last2'
|
||||||
@ -158,7 +164,7 @@
|
|||||||
<query xmlns='jabber:iq:last' seconds='123'/>
|
<query xmlns='jabber:iq:last' seconds='123'/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>In this example, the user has been idle for about two minutes.</p>
|
<p>In the foregoing example, the user has been idle for about two minutes.</p>
|
||||||
<p>Support for this functionality is OPTIONAL. A client that does not support the protocol, or that does not wish to divulge this information, MUST return a &unavailable; error.</p>
|
<p>Support for this functionality is OPTIONAL. A client that does not support the protocol, or that does not wish to divulge this information, MUST return a &unavailable; error.</p>
|
||||||
<example caption='Service Unavailable Error'><![CDATA[
|
<example caption='Service Unavailable Error'><![CDATA[
|
||||||
<iq from='juliet@capulet.com/balcony'
|
<iq from='juliet@capulet.com/balcony'
|
||||||
@ -170,7 +176,7 @@
|
|||||||
</error>
|
</error>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If there is no available resource matching the user@host/resource in the 'to' attribute of the request, the server MUST follow the rules in <cite>XMPP IM</cite> in order to determine what error stanza to return.</p>
|
<p>If there is no available resource matching the <user@host/resource> in the 'to' attribute of the request, the server MUST follow the rules in <cite>XMPP IM</cite> in order to determine what error stanza to return.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Inclusion in Presence' anchor='presence'>
|
<section1 topic='Inclusion in Presence' anchor='presence'>
|
||||||
<p>An online client MAY include last activity information when sending presence updates. The prototypical use case is including the idle time when automatically setting the user's &SHOW; value to "away" or "xa" (extended away). For example, consider a user who has configured her client to automatically change her presence to "away" after 10 minutes of inactivity. The client could include an iq:last flag to specify how long the user has been idle.</p>
|
<p>An online client MAY include last activity information when sending presence updates. The prototypical use case is including the idle time when automatically setting the user's &SHOW; value to "away" or "xa" (extended away). For example, consider a user who has configured her client to automatically change her presence to "away" after 10 minutes of inactivity. The client could include an iq:last flag to specify how long the user has been idle.</p>
|
||||||
@ -193,7 +199,7 @@
|
|||||||
<p>If no last indication is included in a presence notification, the recipient MUST assume that the idle time is zero.</p>
|
<p>If no last indication is included in a presence notification, the recipient MUST assume that the idle time is zero.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Server and Component Query' anchor='server'>
|
<section1 topic='Server and Component Query' anchor='server'>
|
||||||
<p>When the last activity query is sent to a server or component (i.e., to a JID of the form &DOMAINBARE;), the information contained in the IQ reply reflects the uptime of the JID sending the reply. The seconds attribute specifies how long the host has been up and running. The &QUERY; element SHOULD NOT contain XML character data.</p>
|
<p>When the last activity query is sent to a server or component (i.e., to a JID of the form &DOMAINBARE;), the information contained in the IQ reply reflects the uptime of the JID sending the reply. The seconds attribute specifies how long the host has been running since it was last (re-)started. The &QUERY; element SHOULD NOT contain XML character data.</p>
|
||||||
<example caption='Last Activity Query Sent to Server or Service'><![CDATA[
|
<example caption='Last Activity Query Sent to Server or Service'><![CDATA[
|
||||||
<iq from='romeo@montague.net/orchard'
|
<iq from='romeo@montague.net/orchard'
|
||||||
id='last3'
|
id='last3'
|
||||||
@ -201,7 +207,8 @@
|
|||||||
type='get'>
|
type='get'>
|
||||||
<query xmlns='jabber:iq:last'/>
|
<query xmlns='jabber:iq:last'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
]]></example>
|
||||||
|
<example caption='Last Activity Response from Server or Service'><![CDATA[
|
||||||
<iq from='capulet.com'
|
<iq from='capulet.com'
|
||||||
id='last3'
|
id='last3'
|
||||||
to='romeo@montague.net/orchard'
|
to='romeo@montague.net/orchard'
|
||||||
@ -209,7 +216,7 @@
|
|||||||
<query xmlns='jabber:iq:last' seconds='123456'/>
|
<query xmlns='jabber:iq:last' seconds='123456'/>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>In this example, the server has been up for a little more than 34 hours.</p>
|
<p>In this example, the server has been running for a little more than 34 hours.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Determining Support' anchor='support'>
|
<section1 topic='Determining Support' anchor='support'>
|
||||||
<p>If an entity supports the Last Activity protocol, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "jabber:iq:last".</p>
|
<p>If an entity supports the Last Activity protocol, it MUST advertise that fact in its responses to &xep0030; information ("disco#info") requests by returning a feature of "jabber:iq:last".</p>
|
||||||
@ -234,10 +241,10 @@
|
|||||||
<p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
|
<p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Implementation Notes' anchor='impl'>
|
<section1 topic='Implementation Notes' anchor='impl'>
|
||||||
<p>The information contained in an IQ reply for this namespace is inherently ambiguous. Specifically, for a bare JID &LOCALBARE; the information is the time since the JID was last connected to its server; for a full JID &LOCALFULL; the information is the time since the resource was last active in the context of an existing session; and for a bare domain the information is the uptime for the server or component. An application must take these differences into account when presenting the information to a human user.</p>
|
<p>The information contained in an IQ reply for this namespace is inherently ambiguous. Specifically, for a bare JID &LOCALBARE; the information is the time since the JID was last connected to its server; for a full JID &LOCALFULL; the information is the time since the resource was last active in the context of an existing session; and for a bare domain the information is the uptime for the server or component. An application MUST take these differences into account when presenting the information to a human user (if any).</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Security Considerations' anchor='security'>
|
<section1 topic='Security Considerations' anchor='security'>
|
||||||
<p>A server MUST NOT allow an unauthorized entity to learn a user's network availability by sending a Last Activity request to a JID of the form user@host or user@host/resource; i.e., Last Activity information MAY be divulged only to those entities that have permission to view the user's presence via a presence subscription (potentially as restricted by &xep0016; or &xep0191;).</p>
|
<p>A server MUST NOT allow an unauthorized entity to learn a user's network availability by sending a Last Activity request to a JID of the form user@host or user@host/resource, since doing so would constitute a "presence leak" as described in &rfc3920bis;. That is, Last Activity information MAY be divulged only to those entities that have permission to view the user's presence via a presence subscription (potentially as restricted by &xep0016; or &xep0191;).</p>
|
||||||
<p>A client MUST provide a way for a human user to disable sending of Last Activity responses from the client's full JID &LOCALFULL;.</p>
|
<p>A client MUST provide a way for a human user to disable sending of Last Activity responses from the client's full JID &LOCALFULL;.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='IANA Considerations' anchor='iana'>
|
<section1 topic='IANA Considerations' anchor='iana'>
|
||||||
|
Loading…
Reference in New Issue
Block a user