mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
added examples for update use case
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1599 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
48502b9c03
commit
b5c716250a
105
xep-0054.xml
105
xep-0054.xml
@ -56,21 +56,19 @@
|
||||
</section1>
|
||||
<section1 topic='Use Cases'>
|
||||
<section2 topic="Retrieving One's vCard">
|
||||
<p>A user may retrieve his or her own vCard by sending XML of the following form to his or her own JID (the 'to' attibute SHOULD NOT be included):</p>
|
||||
<example caption="Requesting One's Own vCard"><![CDATA[
|
||||
<iq
|
||||
from='stpeter@jabber.org/Gabber'
|
||||
type='get'
|
||||
id='v1'>
|
||||
<p>A user may retrieve his or her own vCard by sending XML of the following form to his or her own JID (the 'to' attibute MUST NOT be included):</p>
|
||||
<example caption="vCard Retrieval Request"><![CDATA[
|
||||
<iq from='stpeter@jabber.org/roundabout'
|
||||
id='v1'
|
||||
type='get'>
|
||||
<vCard xmlns='vcard-temp'/>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>The server should then return the vCard to the user:</p>
|
||||
<example caption="Receiving One's Own vCard"><![CDATA[
|
||||
<iq
|
||||
to='stpeter@jabber.org/Gabber'
|
||||
type='result'
|
||||
id='v1'>
|
||||
<example caption="Server Returns vCard"><![CDATA[
|
||||
<iq id='v1'
|
||||
to='stpeter@jabber.org/roundabout'
|
||||
type='result'>
|
||||
<vCard xmlns='vcard-temp'>
|
||||
<FN>Peter Saint-Andre</FN>
|
||||
<N>
|
||||
@ -121,25 +119,83 @@
|
||||
</iq>
|
||||
]]></example>
|
||||
</section2>
|
||||
<section2 topic="Updating One's vCard">
|
||||
<p>A user may update his or her vCard by sending an IQ of type "set" to the server, following the format in the previous use case.</p>
|
||||
<p>If a user attempts to perform an IQ set on another user's vCard, the server MUST return a 403 "Forbidden" error.</p>
|
||||
<section2 topic="Updating One's vCard">
|
||||
<p>A user may publish or update his or her vCard by sending an IQ of type "set" to the server, following the format in the previous use case.</p>
|
||||
<example caption="vCard Update Request"><![CDATA[
|
||||
<iq id='v2'
|
||||
to='stpeter@jabber.org/roundabout'
|
||||
type='result'>
|
||||
<vCard xmlns='vcard-temp'>
|
||||
<FN>Peter Saint-Andre</FN>
|
||||
<N>
|
||||
<FAMILY>Saint-Andre</FAMILY>
|
||||
<GIVEN>Peter</GIVEN>
|
||||
<MIDDLE/>
|
||||
</N>
|
||||
<NICKNAME>stpeter</NICKNAME>
|
||||
<URL>http://www.xmpp.org/xsf/people/stpeter.shtml</URL>
|
||||
<BDAY>1966-08-06</BDAY>
|
||||
<ORG>
|
||||
<ORGNAME>XMPP Standards Foundation</ORGNAME>
|
||||
<ORGUNIT/>
|
||||
</ORG>
|
||||
<TITLE>Executive Director</TITLE>
|
||||
<ROLE>Patron Saint</ROLE>
|
||||
<TEL><WORK/><VOICE/><NUMBER>303-308-3282</NUMBER></TEL>
|
||||
<TEL><WORK/><FAX/><NUMBER/></TEL>
|
||||
<TEL><WORK/><MSG/><NUMBER/></TEL>
|
||||
<ADR>
|
||||
<WORK/>
|
||||
<EXTADD>Suite 600</EXTADD>
|
||||
<STREET>1899 Wynkoop Street</STREET>
|
||||
<LOCALITY>Denver</LOCALITY>
|
||||
<REGION>CO</REGION>
|
||||
<PCODE>80202</PCODE>
|
||||
<CTRY>USA</CTRY>
|
||||
</ADR>
|
||||
<TEL><HOME/><VOICE/><NUMBER>303-555-1212</NUMBER></TEL>
|
||||
<TEL><HOME/><FAX/><NUMBER/></TEL>
|
||||
<TEL><HOME/><MSG/><NUMBER/></TEL>
|
||||
<ADR>
|
||||
<HOME/>
|
||||
<EXTADD/>
|
||||
<STREET/>
|
||||
<LOCALITY>Denver</LOCALITY>
|
||||
<REGION>CO</REGION>
|
||||
<PCODE>80209</PCODE>
|
||||
<CTRY>USA</CTRY>
|
||||
</ADR>
|
||||
<EMAIL><INTERNET/><PREF/><USERID>stpeter@jabber.org</USERID></EMAIL>
|
||||
<JABBERID>stpeter@jabber.org</JABBERID>
|
||||
<DESC>
|
||||
Check out my blog at https://stpeter.im/
|
||||
</DESC>
|
||||
</vCard>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>The server then returns an IQ-result (or an IQ-error).</p>
|
||||
<example caption="Server Returns Success"><![CDATA[
|
||||
<iq id='v2'
|
||||
to='stpeter@jabber.org/roundabout'
|
||||
type='result'/>
|
||||
]]></example>
|
||||
<p>Notice that the previous IQ-set included only one changed element (the <DESC/> element). Currently there is no method for partial updates of a vCard, and the entire vCard must be sent to the server in order to update any part of the vCard.</p>
|
||||
<p>If a user attempts to perform an IQ set on another user's vCard (i.e., by setting a 'to' address to a JID other than the sending user's bare JID), the server MUST return a 403 "Forbidden" error.</p>
|
||||
</section2>
|
||||
<section2 topic="Viewing Another User's vCard">
|
||||
<p>A user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID. A compliant server MUST return the vCard to the requestor and not forward the IQ to the requestee's connected resource.</p>
|
||||
<section2 topic="Viewing Another User's vCard">
|
||||
<p>A user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID.</p>
|
||||
<example caption="Requesting Another User's vCard"><![CDATA[
|
||||
<iq
|
||||
<iq from='stpeter@jabber.org/roundabout'
|
||||
id='v3'
|
||||
to='jer@jabber.org'
|
||||
type='get'
|
||||
id='v3'>
|
||||
type='get'>
|
||||
<vCard xmlns='vcard-temp'/>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>The server should then return the other user's vCard to the requestor:</p>
|
||||
<p>In accordance with &xmppcore;, a compliant server MUST respond on behalf of the requestor and not forward the IQ to the requestee's connected resource.</p>
|
||||
<example caption="Receiving Another User's vCard"><![CDATA[
|
||||
<iq
|
||||
from='jer@jabber.org'
|
||||
to='stpeter@jabber.org/home'
|
||||
<iq from='jer@jabber.org'
|
||||
to='stpeter@jabber.org/roundabout'
|
||||
type='result'
|
||||
id='v3'>
|
||||
<vCard xmlns='vcard-temp'>
|
||||
@ -155,10 +211,11 @@
|
||||
</vCard>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>Note: The use of vCards is not limited to accounts associated with human users. For example, an XMPP server could itself have a vCard that defines the server's hosting organization, physical location, and relevant contact addresses.</p>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Security Considerations'>
|
||||
<p>There are no security features or concerns related to this proposal.</p>
|
||||
<p>The vCard information published to one's Jabber server is world-readable; therefore, users should exercise due caution when determining what information to include (e.g., street addresses, personal telephone numbers, or email addresses).</p>
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations'>
|
||||
<p>This document requires no interaction with &IANA;.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user