??xml version="1.0" encoding="utf-8" standalone="yes"?>91免费精品国自产拍在线不卡,久久亚洲精品中文字幕,日本在线三级http://www.aygfsteel.com/Jiangzy/category/18851.htmlq个世界上只有两样东西愈分n愈多,那就是智慧与爱?/description>zh-cnFri, 02 Mar 2007 06:46:46 GMTFri, 02 Mar 2007 06:46:46 GMT60XMPP初解 http://www.aygfsteel.com/Jiangzy/articles/91137.html飛雪(leo)飛雪(leo)Sun, 31 Dec 2006 05:17:00 GMThttp://www.aygfsteel.com/Jiangzy/articles/91137.htmlhttp://www.aygfsteel.com/Jiangzy/comments/91137.htmlhttp://www.aygfsteel.com/Jiangzy/articles/91137.html#Feedback0http://www.aygfsteel.com/Jiangzy/comments/commentRss/91137.htmlhttp://www.aygfsteel.com/Jiangzy/services/trackbacks/91137.html  1、什么是XMPP Q?br />XMPPQ即Extensible Messaging and Presence ProtocolQ其前n是JabberQ一个开源Ş式组l生的|络x通信协议。XMPP目前被IETF国际标准l织完成了标准化工作。标准化的核心结果分Z部分Q?
核心的XML传输协?
ZXML传输的x通讯扩展应用
XMPP的核心XML传输协议的定义使得XMPP能够在一个比以往|络通信协议更规范的q_上。借助于XML易于解析和阅ȝҎ,使得XMPP的协议能够非常漂亮?
XMPP的即旉讯扩展应用部分是根据IETF在这之前对即旉讯的一个抽象定义的Q与其他业已得到q泛使用的即旉讯协议Q诸如AIMQQQ{有功能完整Q完善等先进性?

2、XMPP的基本网l结构是怎样的?
XMPP中定义了三个角色Q客LQ服务器Q网兟뀂通信能够在这三者的L两个之间双向发生。服务器同时承担了客L信息记录Q连接管理和信息的\由功能。网x担着与异构即旉信pȝ的互联互通,异构pȝ可以包括SMSQ短信)QMSNQICQ{。基本的|络形式是单客户端通过TCP/IPq接到单服务器,然后在之上传输XML?

3、XMPP通过TCP传什么了Q?
传输的是与即旉讯相关的指令。在以前q些命o要么?q制的Ş式发送(比如QQQ,要么用纯文本指o加空格加参数加换行苻的方式发送(比如MSNQ。而XMPP传输的即旉讯指o的逻辑与以往总Q只是协议的形式变成了XML格式的纯文本。这不但使得解析Ҏ了,ZҎ阅读了,方便了开发和查错。而XMPP的核心部分就是一个在|络上分片断发送XML的流协议。这个流协议是XMPP的即旉讯指o的传递基Q也是一个非帔R要的可以被进一步利用的|络基础协议。所以可以说QXMPP用TCP传的是XML?

4、D个例子看看所谓的XML是什么样子的Q?
客户端:<?xml version='1.0'?>
       <stream:stream
       to='example.com'
       xmlns='jabber:client'
       xmlns:stream='http://etherx.jabber.org/streams'
       version='1.0'>
服务器:<?xml version='1.0'?>
       <stream:stream
       from='example.com'
       id='someid'
       xmlns='jabber:client'
       xmlns:stream='http://etherx.jabber.org/streams'
       version='1.0'>
...其他通信...
客户端:<message from='juliet@example.com'
              to='romeo@example.net'
              xml:lang='en'>
客户端: <body>Art thou not Romeo, and a Montague?</body>
客户端: </message>
服务器: <message from='romeo@example.net'
              to='juliet@example.com'
              xml:lang='en'>
服务器:<body>Neither, fair saint, if either thee dislike.</body>
服务器:</message>
客户端:</stream:stream>
服务器:</stream:stream>
以文档的观点来看Q客L或服务器发送的所有XML文本q缀在一P?lt;stream>?lt;/stream>构成了一个完整的XML文档。其中的stream标签是所谓的XML Stream。在<stream>?lt;/stream>中间的那?lt;message>...</message>q样的XML元素是所谓的XML StanzaQXML节)。XMPP核心协议通信的基本模式就是先建立一个streamQ然后协商一堆安全之cȝ东西Q中间通信q程是客户端发送XML StanzaQ一个接一个的。服务器Ҏ客户端发送的信息以及E序的逻辑Q发送XML Stanzal客L。但是这个过Eƈ不是一问一{的QQ何时候都有可能从一个方发信l另外一斏V通信的最后阶D|</stream>关闭,关闭TCP/IPq接?
GTalk所遵@的协?--XMPP

前几天Google发布了一Ƒ֐叫Google Talk的即旉讯软gQ这ƾY件的买点卖点之一是XMPP。那Q什么是XMPP呢?
   可扩展通讯和表C协?(XMPP) 可用于服务类实时通讯、表C和需?- 响应服务中的 XML 数据元流式传输。XMPP ?Jabber 协议为基Q?Jabber 是即旉讯中常用的开攑ּ协议?br />   管 XMPP 没有完全溶合qQ何特定的|络架构之中Q但是通过客户?服务器架构,它还是经常被采用Q因为客h需要?XMPP l过 TCP q接讉K服务器,而服务器之间也是通过 TCP q接q行通信的。服务器可v?XMPP 通讯的智能提取层的作用。许多客h直接通过 TCP q接与服务器相连Qƈ使用 XMPP 来充分用服务器和Q何相x务所提供的功能。同时连接到服务器的可能有多U资源,它们代表各自已获授权的客h。对于客h和服务器之间的连接,推荐使用的端口号?5222 。网x一U有着Ҏ用途的服务器端服务Q它的主要功能是在异构通讯pȝ协议之中解析 XMPP Q同时还要在 XMPP 之中解析q回的数据,如以下各各种服务的网养I电子邮g、国际互联网中聊天QIRCQ、SIMPLE、短信息服务QSMSQ和现存的各U即旉讯服务Q包?AIM、ICQ、MSN Messenger ?Yahoo! Instant Messenger {?br />  两个基本概念 ?XML 数据和 XML 节得较结构化信息的有效负载可以在敏感于数据传输的实体间进行迅速的异步传输。一?XML 数据就像一U容器,可应用在M两个|络实体?XML 数据元的交换。XML 节是l构化信息的独立单元Q通过 XML 数据从一个实体发送到另一个实体?br />  XMPP 中包含了一U用于防范数据流被窜改和偷听的办法。这U信道加密的办法使用了传输层安全协议QTLSQ,q同其扩展协?STARTTLS 。这U扩展与其它协议的扩展是同一模式的,?IMAP、POP3 ?ACAP {协议。XMPP 中还包含一U对数据进行验证的办法Qƈ采用了简单验证和安全层协议(SASLQ中 XMPP 的特定框架?

协议l构
  XML 数据在所?XML 节的传送会话过E中起到一U包l的作用。我们可以采用一U单U的方式来表C个过E:
|--------------------|
| <stream>           |
|--------------------|
| <presence>         |
| <show/>            |
| </presence>        |
|--------------------|
| <message to='foo'> |
| <body/> |
| </message> |
|--------------------|
| <iq to='bar'> |
| <query/> |
| </iq> |
|--------------------|
| ... |
|--------------------|
| </stream> |
|--------------------|
 
 

 



飛雪(leo) 2006-12-31 13:17 发表评论
]]>
开攄XMPPhttp://www.aygfsteel.com/Jiangzy/articles/91135.html飛雪(leo)飛雪(leo)Sun, 31 Dec 2006 05:08:00 GMThttp://www.aygfsteel.com/Jiangzy/articles/91135.htmlhttp://www.aygfsteel.com/Jiangzy/comments/91135.htmlhttp://www.aygfsteel.com/Jiangzy/articles/91135.html#Feedback0http://www.aygfsteel.com/Jiangzy/comments/commentRss/91135.htmlhttp://www.aygfsteel.com/Jiangzy/services/trackbacks/91135.htmlZRFC 3920QRFC 2779{标准协议的研究Q一点个Z?

好久没写文章了,感觉有点累,l于Q看CUU在招人,竟然要求最好是BLOG作ؓ历,所以ؓ之一触,补一下自qblog?/p>

规划了很久的l一消息模型Q终于在一个图上表现完了:Q。。?/p>

Zl一各个pȝ中的消息Q计划采用以XMPP协议为基的统一消息pȝQ在pȝ上构Zaxis为基的web service来提供相关的接口标准Q这栯实现吗?

能统一什么?

·l一各个pȝ的消?/p>

·l一邮g

·l一的短?/p>

·l一的VOIP呼叫

·l一ZT.38协议的网l传?/p>

·l一一切该l一?/p>

支持什么操作系l?

Linux、Windows

支持的数据库Q?/strong>

DB2、ORACLE、MS SQL 、MY SQL、HSQL

能与什么系l统一能?

·ZWEB的应用系l(ASP、PHP、JSPQ?/p>

·L开发语a~写的应用系l(C、VB、DELPHI....Q?/p>

Z开攄axis作ؓweb service可以很方便的为其他系l提供统一的标准及接口Q但是会面一个问题:别h的系lؓ什么要和你l一h呢?q个问题要思?...

OA、ERP、CMS{都面͘q个问题Q统一的消息机制是他们急需的,而对于企业,各个pȝ中消息的l一Q以及完善的通知手段Q包括文字、邮件、短信、传真、电话等Q是必须的?/p>

使用VoIP相关功能Q我们可以徏立多U应用服务,例如VoIP+TTS构g自动语音留言、VoIP多方电话会议{?/p>



飛雪(leo) 2006-12-31 13:08 发表评论
]]>
RFC 3920 ?XMPP http://www.aygfsteel.com/Jiangzy/articles/91134.html飛雪(leo)飛雪(leo)Sun, 31 Dec 2006 05:05:00 GMThttp://www.aygfsteel.com/Jiangzy/articles/91134.htmlhttp://www.aygfsteel.com/Jiangzy/comments/91134.htmlhttp://www.aygfsteel.com/Jiangzy/articles/91134.html#Feedback0http://www.aygfsteel.com/Jiangzy/comments/commentRss/91134.htmlhttp://www.aygfsteel.com/Jiangzy/services/trackbacks/91134.html

1 ?/font> Extensible Messaging and Presence Protocol (XMPP): Core

1.1. Status of this Memo/ 说明

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文档详l说明了应用?/font> Internet 通讯的标准协议。对于本协议的更新的一些需求讨论和Q请提交当前版本到“国际标准协议组l”。本文档分发不受限制?/span>

1.2. Copyright Notice/ 版权x

Copyright (C) The Internet Society (2004).

1.3. Abstract/ 概要

This memo defines the core features of the Extensible Messaging and Presence Protocol (XMPP), a protocol for streaming Extensible Markup Language (XML) elements in order to exchange structured information in close to real time between any two network endpoints. While XMPP provides a generalized, extensible framework for exchanging XML data, it is used mainly for the purpose of building instant messaging and presence applications that meet the requirements of RFC 2779.

本文定义?/font> XMPP 协议的核心特性?/font> XMPP 是基?/font> XML 元素扩展的Q它旨在向两个网l终端在q乎实时的情况下交换l构信息?/font> XMPP 也提供了一个没有显著特点的Q可扩展?/font> XML 数据交换的框架结构模型。在 RFC 2779 标准定义的需求下Q它应用于徏立即旉讯和即时会议的应用E序?/span>

1.4. Table of Contents/ 目录

1.       Introduction/ ?/font>

2.       Generalized Architecture/ 通用的结?/span>

3.       Addressing Scheme/ 地址配置

4.       XML Streams/ XML ?/font>

5.       Use of TLS/ TSL 的应?/font>

6.       Use of SASL / SASL 的应?/font>

7.       Resource Binding / 资源l定  

8.       Server Dialback / 服务回叫

9.       XML Stanzas / XML ?/font>

10.    Server Rules for Handling XML Stanzas / XML 操作的服务规?/font>  

11.    XML Usage within XMPP / XMPP ?/font> XML 用法  

12.    Core Compliance Requirements /   核心需?/span>

13.    Internationalization Considerations / 国际化考虑  

14.    Security Considerations / 安全考虑  

15.    IANA Considerations / IANA 考虑

16.    References / 参考文?/span>

17.    Nodeprep / 节点命名

·         B. Resourceprep / 资源命名

·         C. XML Schemas / XML 计划

·         D. Differences Between Core Jabber Protocols and XMPP / JABBER ?/font> XMPP 核心协议的区?/span>

       ·         Contributors/ 贡献?/span>

·         Acknowledgements/ 知识准备

·         Author's Address/ 作者地址

·         Full Copyright Statement/ 版权x              待箋.........

1.4   1. Introduction/?/font>

1.4 1.1 Overview/lD

The Extensible Messaging and Presence Protocol (XMPP) is an open Extensible Markup Language [XML] protocol for near-real-time messaging, presence, and request-response services. The basic syntax and semantics were developed originally within the Jabber open-source community, mainly in 1999. In 2002, the XMPP WG was chartered with developing an adaptation of the Jabber protocol that would be suitable as an IETF instant messaging (IM) and presence technology. As a result of work by the XMPP WG, the current memo defines the core features of XMPP 1.0; the extensions required to provide the instant messaging and presence functionality defined in RFC 2779 [IMP-REQS] are specified in the Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence [XMPP-IM].

xmpp是一个开攄Zxml?提供 q乎实时消息、现场勘察和h应答服务的协议。它最初是由jabber开源社区在大约 1999q发起ƈ一直领导的x消息的实时系l,?002q_xmpp WG 。作为xmppWG的工作结果,当前备忘录定义了xmpp1.0的核心特??q个扩展部要求提供定义在<<rfc 2779>>的即时消息和现场勘察功能Q是列在xmpp ? [xmpp-im]?/font>

1.4  1.2 Terminology/术语

The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [TERMS].

下面大写的关键字 "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "REC OMMENDED", "MAY", and "OPTIONAL" 在这文档中的意?请参见RFC 2119

1.4  2. Generalized Architecture/通用的结?/font>

1.4  2.1 Overview/lD

 Although XMPP is not wedded to any specific network architecture, to date it usually has been implemented via a client-server architecture wherein a client utilizing XMPP accesses a server over a [TCP] connection, and servers also communicate with each other over TCP connections.

The following diagram provides a high-level overview of this architecture (where "-" represents communications that use XMPP and "=" represents communications that use any other protocol).

C1---S1---S2--C3

  • |

C2---+---G1==============FN1==================FC1

The symbols are as follows:

·C1, C2, C3 = XMPP clients

·S1, S2 = XMPP servers

·G1 = A gateway that translates between XMPP and the protocol(s)

             used on a foreign (non-XMPP) messaging network

·FN1 = A foreign messaging network

·FC1 = A client on a foreign messaging network

管xmpp不想与Q何特D的|络体系机构相结合,但它通常是基于c/s架构的, 其中一个客L通过一个tcpq接按着 xmpp 讉K一个服务器Q?服务器同样也?通过tcp与其它实体通信?/p>

下面的图表提供了q个体系机构的高层视?--代表用xmppq行通信Q?代表?其它协议q行通信 )?

C1---S1---S2--C3

  • |

C2---+---G1==============FN1==================FC1

·C1,C2,C3 代表 XMPP客户?/p>

·S1,S2代表XMPP服务?/p>

·G1代表一个网养I它XMPP?其它外部(非xmpp)消息|络之间的翻译?/p>

·FN1 代表一个外部消息网l?/p>

·FC1 代表一个外部消息网l的客户端。                               ?待箋.........

 

1.4  2.2. Server/服务?/h3>

A server acts as an intelligent abstraction layer for XMPP communications. Its primary responsibilities are:

·to manage connections from or sessions for other entities, in the form of XML streams (Section 4) to and from authorized clients, servers, and other entities

·to route appropriately-addressed XML stanzas (Section 9) among such entities over XML streams

Most XMPP-compliant servers also assume responsibility for the storage of data that is used by clients (e.g., contact lists for users of XMPP-based instant messaging and presence applications); in this case, the XML data is processed directly by the server itself on behalf of the client and is not routed to another entity.

一个服务担当一个XMPP通信的智能提取层Q这主要负责Q?/p>

·理一个来自其它通信实体的以xml方式的q接或会话, 它可以来自于授权的客L、服务器、或者其它通信实体

·路由在基于xml实体中h正确地址的xml? W九?

大多数的支持xmpp的服务器也可能ؓ用户担Q数据存储的职? 如用L联系列表);既然q样Q服务器代表用户直接处理xml数据Q而不被\由到另一个实体?/p>

1.4  2.3 Client/客户?/h3>

Most clients connect directly to a server over a [TCP] connection and use XMPP to take full advantage of the functionality provided by a server and any associated services. Multiple resources (e.g., devices or locations) MAY connect simultaneously to a server on behalf of each authorized client, with each resource differentiated by the resource identifier of an XMPP address (e.g., <node@domain/ home> vs. <node@domain/work>) as defined under Addressing Scheme (Section 3). The RECOMMENDED port for connections between a client and a server is 5222, as registered with the IANA (see Port Numbers (Section 15.9)).

大多数的客户端直接通过tcp与服务器q接Q用XMPP协议充分利用一个服务和M相关的服务提供的功能。多个的资源(如设备或地区)可能同时q接C个服务器Q各自代表的一个授权的客户Q它们通过XMPP地址(?<node@domain/home> ?<node@domain/work>)?strong>resource标识W来区别。推荐的q接端口?font color="#ff0000">5222, 它已向IANA注册?/font>

1.4  2.4 Gateway/|关

A gateway is a special-purpose server-side service whose primary function is to translate XMPP into the protocol used by a foreign (non-XMPP) messaging system, as well as to translate the return data back into XMPP. Examples are gateways to email (see [SMTP]), Internet Relay Chat (see [IRC]), SIMPLE (see [SIMPLE]), Short Message Service (SMS), and legacy instant messaging services such as AIM, ICQ, MSN Messenger, and Yahoo! Instant Messenger. Communications between gateways and servers, and between gateways and the foreign messaging system, are not defined in this document.

一个网x服务器上的一个具有特D目的的服务。它主要的功能是与外部消息系l通信Ӟxmpp数据译成该pȝ的协议数据,同是该pȝq回的数据翻译成xmpp数据。例如email, irc, SIMPLE,SMS, 和其它的x消息?AIM,ICQ, MSN Messenger, Yahoo!.|关与服务器之间的通信 ?|关与外部消息系l之?的通信的定义不在这文档中?/p>

1.4  2.5  Network/|络

Because each server is identified by a network address and because server-to-server communications are a straightforward extension of the client-to-server protocol, in practice, the system consists of a network of servers that inter-communicate. Thus, for example, < juliet@example.com > is able to exchange messages, presence, and other information with < romeo@example.net >. This pattern is familiar from messaging protocols (such as [SMTP]) that make use of network addressing standards. Communications between any two servers are OPTIONAL. If enabled, such communications SHOULD occur over XML streams that are bound to [TCP] connections. The RECOMMENDED port for connections between servers is 5269, as registered with the IANA (see Port Numbers (Section 15.9)).

因ؓ每一个服务器都可以通过一个网l地址来标识,同时因ؓ服务器之间的通信是客L与服务器之间的通信协议的一个直接的扩展Q在实践中,pȝ׃互通信的服务器|络l成。因此,例如< juliet@example.com >能够?lt; romeo@example.net > 交换消息、现场勘察和其它信息。这U模式在使用|络地址标准的消息通信协议 (如SMTP)中是常见的,M两个通信是可选的。如开启,那么通信在基于xml上发生Q它一定要建立TCPq接。推荐的q接端口?font color="#ff0000">5269, 它已向IANA注册?/font>

1.4  3. Addressing Scheme/地址配置

1.4 3.1 Overview/lD

An entity is anything that can be considered a network endpoint (i.e., an ID on the network) and that can communicate using XMPP. All such entities are uniquely addressable in a form that is consistent with RFC 2396 [URI]. For historical reasons, the address of an XMPP entity is called a Jabber Identifier or JID. A valid JID contains a set of ordered elements formed of a domain identifier, node identifier, and resource identifier.

The syntax for a JID is defined below using the Augmented Backus-Naur Form as defined in [ABNF]. (The IPv4address and IPv6address rules are defined in Appendix B of [IPv6]; the allowable character sequences that conform to the node rule are defined by the Nodeprep profile of [STRINGPREP] as documented in Appendix A of this memo; the allowable character sequences that conform to the resource rule are defined by the Resourceprep profile of [STRINGPREP] as documented in Appendix B of this memo; and the sub-domain rule makes reference to the concept of an internationalized domain label as described in [IDNA].)

jid = [ node "@" ] domain [ "/" resource ] domain = fqdn / address-literal fqdn = (sub-domain 1*("." sub-domain)) sub-domain = (internationalized domain label) address-literal = IPv4address / IPv6address

All JIDs are based on the foregoing structure. The most common use of this structure is to identify an instant messaging user, the server to which the user connects, and the user's connected resource (e.g., a specific client) in the form of <user@host/resource>. However, node types other than clients are possible; for example, a specific chat room offered by a multi-user chat service could be addressed as <room@service> (where "room" is the name of the chat room and "service" is the hostname of the multi-user chat service) and a specific occupant of such a room could be addressed as <room@service/nick> (where "nick" is the occupant's room nickname). Many other JID types are possible (e.g., <domain/resource> could be a server-side script or service).

Each allowable portion of a JID (node identifier, domain identifier, and resource identifier) MUST NOT be more than 1023 bytes in length, resulting in a maximum total size (including the '@' and '/' separators) of 3071 bytes.

一个实体可以是M|络端点(如网l中的一个ID)q能够用XMPP通信的事 物?所有这一cȝ实体可以唯一~址的,q符合[RFC 2396 [URI]]风格?因ؓ历史原因Q?strong>一个XMPP实体的地址被叫做Jabber标识W或JID。一个有效的JID包括三个部分Q?strong>域标识符Q?strong>节点标识W?/strong>?strong>资源标识W?/strong>

JID语法使用[ABNF]表达式定义?IPv4地址和IPv6地址的规则的定义在附录B [IPv6] ?/p>

jid = [ node "@" ] domain [ "/" resource ]

domain = fqdn / address-literal

fqdn = (sub-domain 1*("." sub-domain))

sub-domain = (internationalized domain label)

address-literal = IPv4address / IPv6address

所有的JID都是Z上述l构中的。这个结构大多是用来标识一个即时消息通信的用P在服务器上有哪几个连接,及用Lq接资源?lt;user@host/resource> 的Ş? 可是,节点的类型可能不是客L;例如一个聊天室提供多用戯天服务,它的地址可以可以?lt;room@service>( “room”是 聊天室的名字Q?service"是提供多用户聊天服务的主机名) 。或者一个聊天室中的 某个用户被编址?lt;room@service/nick> ( "mick"是该用户在聊天室中的늧). h多个其它JIDcd是可能的(?lt;domain/resource>可以是一个服务器端的 script或服??/p>

一个JID的每一部分(域标识符Q节Ҏ识符和资源标识符)的长度都不能过1023 个字节,从而d节数(包括"@"?/")不能过3071个字节?/p>

                                                                                                                         待箋......



飛雪(leo) 2006-12-31 13:05 发表评论
]]>
XMPP 协议http://www.aygfsteel.com/Jiangzy/articles/91132.html飛雪(leo)飛雪(leo)Sun, 31 Dec 2006 04:54:00 GMThttp://www.aygfsteel.com/Jiangzy/articles/91132.htmlhttp://www.aygfsteel.com/Jiangzy/comments/91132.htmlhttp://www.aygfsteel.com/Jiangzy/articles/91132.html#Feedback0http://www.aygfsteel.com/Jiangzy/comments/commentRss/91132.htmlhttp://www.aygfsteel.com/Jiangzy/services/trackbacks/91132.htmlXMPP 协议XMPP 协议是在www.jabber.org上公布的Q是一U标准的x通讯协议
JEP-0078: Non-SASL Authentication
 
SASLQ?/span>Simple Authentication and Security Layer 单的认证及加密层
 

1、客L向服务器端发?/span>XML?/span>
<stream:stream to='shakespeare.lit'
     xmlns='jabber:client'
               xmlns:stream='http://etherx.jabber.org/streams'>
 
 

2、服务器q回消息
<iq type='get' to='shakespeare.lit' id='auth1'>
 <query xmlns='jabber:iq:auth'/>
</iq>
注意中间?/span>IDQ这?/span>ID是服务器端返回给客户端的验证信息Q验证信息一般是以该ID?/span>+用户密码通过SHA1(RFC3174)法q行操作的。也是说客L得到?/span>ID和密码经q?/span>SHA1法加密后返回给服务器?/span>
 
 

3、客Lx务器提交h获取d需要验证的字段
<iq type='get' to='shakespeare.lit' id='auth1'>
 <query xmlns='jabber:iq:auth'/>
</iq>
 
 

4、服务器q回d需要验证的字段
<iq type='result' id='auth1'>
 <query xmlns='jabber:iq:auth'>
    <username/>
    <password/>
    <digest/> q个digest是上面l过SHA1法得出的结果字D?/span>
    <resource/>
 </query>
</iq>
如果客户端发送的字段包括了用户名?/span>IQ-GET的字D,服务器不应该q回错误消息Q因为需要服务器判断当前用户名是否在使用Q,如果服务器不支持可插入的单认证及密码模块Q那么必返回一?/strong><service-unavailable/>的错?/span>;如果客户端企图?/span>SASL认证但是p|Q服务器必须q回<policy-violation/>错误信息
在认证过E中Q?/span>jabber:iq:auth命名、用户名和资源是必须要求客户端提供的Q?/span>而服务器q回?/span>XML中也必L?/span><username/>?/span><resource/>q?/span>2个元素?/span>
 
 

5、客L提交字段内容q行验证
文本格式Q非加密模式
<iq type='set' id='auth2'>
 <query xmlns='jabber:iq:auth'>
    <username>bill</username>
    <password>Calli0pe</password>
    <resource>globe</resource>
 </query>
</iq>
加密模式
<iq type='set' id='auth2'>
 <query xmlns='jabber:iq:auth'>
    <username>bill</username>
    <digest>48fc78be9ec8f86d8ce1c39c320c97c21d62334d</digest>
    <resource>globe</resource>
 </query>
</iq>
 

6、登录结?/span>
成功
<iq type='result' id='auth2'/>
p| ?认证p|Q可能是用户名密码不匚w或数字验证错?/span>
<iq type='error' id='auth2'>
 <error code='401' type='auth'>
    <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
 </error>
</iq>
p| ?资源冲突/错误
<iq type='error' id='auth2'>
 <error code='409' type='cancel'>
    <conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
 </error>
</iq>
p| ?没有提供需要验证的字段
<iq type='error' id='auth2'>
 <error code='406' type='modify'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
 </error>
</iq>
 
 
 
其他的就没什么重要的了,JEP-0078到此了吧,剩余的重要工作就是如何配|?/span>SASL


飛雪(leo) 2006-12-31 12:54 发表评论
]]>
ZXMPP的JABBERD功能Ҏ分?/title><link>http://www.aygfsteel.com/Jiangzy/articles/91131.html</link><dc:creator>飛雪(leo)</dc:creator><author>飛雪(leo)</author><pubDate>Sun, 31 Dec 2006 04:50:00 GMT</pubDate><guid>http://www.aygfsteel.com/Jiangzy/articles/91131.html</guid><wfw:comment>http://www.aygfsteel.com/Jiangzy/comments/91131.html</wfw:comment><comments>http://www.aygfsteel.com/Jiangzy/articles/91131.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/Jiangzy/comments/commentRss/91131.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/Jiangzy/services/trackbacks/91131.html</trackback:ping><description><![CDATA[     摘要: ZXMPP的JABBERD功能Ҏ分? ...  <a href='http://www.aygfsteel.com/Jiangzy/articles/91131.html'>阅读全文</a><img src ="http://www.aygfsteel.com/Jiangzy/aggbug/91131.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/Jiangzy/" target="_blank">飛雪(leo)</a> 2006-12-31 12:50 <a href="http://www.aygfsteel.com/Jiangzy/articles/91131.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ʯ</a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">山</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ư</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ȷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ͼʲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">԰</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank">찲</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">պ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">찲</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">˺</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˫</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">»</a>| <a href="http://" target="_blank">Ʊ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>