<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Non-SASL Authentication</title>
  <abstract>This document specifies a protocol for authentication with Jabber servers and services using the jabber:iq:auth namespace. Note Well: The protocol specified herein has been superseded in favor of SASL authentication as specified in RFC 3920 / RFC 6120, and is now obsolete.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0078</number>
  <status>Obsolete</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>RFC 3174</spec>
  </dependencies>
  <supersedes/>
  <supersededby>
    <spec>RFC 6120</spec>
  </supersededby>
  <shortname>iq-auth</shortname>
  <schemaloc>
    <url>http://www.xmpp.org/schemas/iq-auth.xsd</url>
  </schemaloc>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  <revision>
    <version>2.5</version>
    <date>2008-10-29</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the XMPP Council, changed status to Obsolete.</p></remark>
  </revision>
  <revision>
    <version>2.4</version>
    <date>2008-01-30</date>
    <initials>psa</initials>
    <remark><p>Clarified the reasoning behind adoption of SASL and corrected the security considerations accordingly.</p></remark>
  </revision>
  <revision>
    <version>2.3</version>
    <date>2006-09-13</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, changed status to Deprecated.</p></remark>
  </revision>
  <revision>
    <version>2.2</version>
    <date>2005-06-28</date>
    <initials>psa</initials>
    <remark><p>Corrected error in schema and example (username is not required in IQ-get).</p></remark>
  </revision>
  <revision>
    <version>2.1</version>
    <date>2004-12-09</date>
    <initials>psa</initials>
    <remark><p>Changed SHOULD to MUST regarding priority of SASL (RFC 3920) over jabber:iq:auth (XEP-0078).</p></remark>
  </revision>
  <revision>
    <version>2.0</version>
    <date>2004-10-20</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, advanced status to Final.</p></remark>
  </revision>
  <revision>
    <version>1.8</version>
    <date>2004-10-18</date>
    <initials>psa</initials>
    <remark><p>Specified advertising iq-auth stream feature is implementation-specific; clarified several small matters in the text.</p></remark>
  </revision>
  <revision>
    <version>1.7</version>
    <date>2004-07-27</date>
    <initials>psa</initials>
    <remark><p>Added reference to character escaping in digest authentication; required inclusion of stream feature when server supports stream features and it is safe to advertise non-SASL authentication.</p></remark>
  </revision>
  <revision>
    <version>1.6</version>
    <date>2004-07-21</date>
    <initials>psa</initials>
    <remark><p>Removed reference to UTF-16, which is disallowed by XMPP Core; removed reference to character escaping in digest authentication pending list discussion.</p></remark>
  </revision>
  <revision>
    <version>1.5</version>
    <date>2004-02-18</date>
    <initials>psa</initials>
    <remark><p>Added optional stream feature.</p></remark>
  </revision>
  <revision>
    <version>1.4</version>
    <date>2004-02-03</date>
    <initials>psa</initials>
    <remark><p>Clarified that username and resource are required for authentication.</p></remark>
  </revision>
  <revision>
    <version>1.3</version>
    <date>2003-11-26</date>
    <initials>psa</initials>
    <remark><p>Added XMPP error handling.</p></remark>
  </revision>
  <revision>
    <version>1.2</version>
    <date>2003-11-06</date>
    <initials>psa</initials>
    <remark><p>Addressed case of attempting jabber:iq:auth after SASL failure.</p></remark>
  </revision>
  <revision>
    <version>1.1</version>
    <date>2003-10-02</date>
    <initials>psa</initials>
    <remark><p>Moved change password use case to XEP-0077.</p></remark>
  </revision>
  <revision>
    <version>1.0</version>
    <date>2003-06-18</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, advanced status to Draft.</p></remark>
  </revision>
  <revision>
    <version>0.8</version>
    <date>2003-06-18</date>
    <initials>psa</initials>
    <remark><p>Changes to address Council concerns.</p></remark>
  </revision>
  <revision>
    <version>0.7</version>
    <date>2003-06-13</date>
    <initials>psa</initials>
    <remark><p>Added change password use case; added more details to security considerations.</p></remark>
  </revision>
  <revision>
    <version>0.6</version>
    <date>2003-06-12</date>
    <initials>psa</initials>
    <remark><p>Added digest example; clarified escaping requirements; further specified error conditions; added more details to security considerations.</p></remark>
  </revision>
  <revision>
    <version>0.5</version>
    <date>2003-06-06</date>
    <initials>psa</initials>
    <remark><p>Removed XMPP-style error conditions until formats are stable.</p></remark>
  </revision>
  <revision>
    <version>0.4</version>
    <date>2003-05-30</date>
    <initials>psa</initials>
    <remark><p>Removed "enhanced digest" content, added information about expiration date.</p></remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2003-05-28</date>
    <initials>psa</initials>
    <remark><p>Added "enhanced digest" method.</p></remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2003-05-20</date>
    <initials>psa</initials>
    <remark><p>Slight editorial revisions.</p></remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2003-04-10</date>
    <initials>psa</initials>
    <remark><p>Initial version.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p><em>Note Well: The protocol specified herein has been superseded in favor of SASL authentication as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc3920">RFC 3920</link></span> <note>RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc3920">http://tools.ietf.org/html/rfc3920</link>&gt;.</note> and <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note>, and is now obsolete.</em></p>
  <p>Jabber technologies have long included a wire protocol that enables a client to authenticate with a server. <note>Component authentication is out of scope for this document, and is specified separately in <span class="ref"><link url="https://xmpp.org/extensions/xep-0114.html">Jabber Component Protocol (XEP-0114)</link></span> <note>XEP-0114: Jabber Component Protocol &lt;<link url="https://xmpp.org/extensions/xep-0114.html">https://xmpp.org/extensions/xep-0114.html</link>&gt;.</note>.</note> The method originally used in the Jabber community makes use of the 'jabber:iq:auth' namespace and has been documented variously in Internet-Drafts and elsewhere. When the core Jabber protocols were formalized by the IETF, the 'jabber:iq:auth' protocol was replaced by the Simple Authentication and Security Layer (SASL) as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc4422">RFC 4422</link></span> <note>RFC 4422: Simple Authentication and Security Layer (SASL) &lt;<link url="http://tools.ietf.org/html/rfc4422">http://tools.ietf.org/html/rfc4422</link>&gt;.</note>. SASL was incorporated into XMPP because it provides a more flexible approach to authentication by enabling XMPP entities to use a wide variety of authentication methods (e.g., PLAIN, DIGEST-MD5, EXTERNAL, and ANONYMOUS), some of which are more secure than the 'jabber:iq:auth' protocol.</p>
  <p>The 'jabber:iq:auth' protocol specified herein is now obsolete. However, because it will take some time for existing implementations and deployments to be upgraded to SASL, client and server software implementations still need to include support for 'jabber:iq:auth' in order to interoperate, and this document provides canonical documentation of the 'jabber:iq:auth' protocol. Nevertheless, implementation and deployment of SASL authentication is strongly recommended, since the 'jabber:iq:auth' protocol will eventually be obsoleted entirely.</p>
</section1>
<section1 topic="Requirements" anchor="reqs">
  <p>The 'jabber:iq:auth' namespace must make it possible for a Jabber client to authenticate with a server. In particular, the client must provide a username and appropriate credentials for the specific authentication method used. The methods defined herein are:</p>
  <ol>
    <li>plaintext</li>
    <li>digest (using the SHA1 algorithm specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc3174">RFC 3174</link></span> <note>RFC 3174: US Secure Hash Algorithm 1 (SHA1) &lt;<link url="http://tools.ietf.org/html/rfc3174">http://tools.ietf.org/html/rfc3174</link>&gt;.</note>)</li>
  </ol>
  <p>Note: This document does not include the so-called "zero-knowledge" method; that method did not provide stronger security than digest authentication and thus is unnecessary.</p>
</section1>
<section1 topic="Use Cases" anchor="usecases">
  <section2 topic="User Authenticates with Server" anchor="usecases-auth">
    <p>In order to determine which fields are required for authentication with a server, a client SHOULD first send an IQ get to the server. A client SHOULD NOT attempt to guess at the required fields, since the nature of the required data is subject to service provisioning.</p>
    <example caption="Client Requests Authentication Fields from Server"><![CDATA[
<iq type='get' to='shakespeare.lit' id='auth1'>
  <query xmlns='jabber:iq:auth'/>
</iq>
]]></example>
    <example caption="Server Returns Authentication Fields to Client"><![CDATA[
<iq type='result' id='auth1'>
  <query xmlns='jabber:iq:auth'>
    <username/>
    <password/>
    <digest/>
    <resource/>
  </query>
</iq>
]]></example>
    <p>If the client included a username with the IQ-get but there is no such username, the server SHOULD NOT return an error, but instead SHOULD return the normal authentication fields (this helps to prevent unknown users from discovering which usernames are in use). If the server does not support non-SASL authentication (e.g., because it supports only SASL authentication as defined in <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note>), it MUST return a &lt;service-unavailable/&gt; error. If the client previously attempted SASL authentication but that attempt failed, the server MUST return a &lt;policy-violation/&gt; stream error (see <cite>RFC 6120</cite> regarding stream error syntax).</p>
    <p>Both the username and the resource are REQUIRED for client authentication using the 'jabber:iq:auth' namespace; if more flexible authentication and resource provisioning are desired, a server SHOULD implement SASL authentication and resource binding as defined in <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note> (e.g., to enable the server to provide the resource). The &lt;username/&gt; and &lt;resource/&gt; elements MUST be included in the IQ result returned by the server in response to the initial IQ get, and also MUST be included in the IQ set sent by the client when providing authentication credentials.</p>
    <p>The foregoing stanza shows that the server supports both plaintext authentication (via the &lt;password/&gt; element) and digest authentication with SHA1-encrypted passwords (via the &lt;digest/&gt; element).</p>
    <p>Therefore, in order to successfully authenticate with the server in this example, a client MUST provide a username, a resource, and one of password or digest.</p>
    <example caption="Client Provides Required Information (Plaintext)"><![CDATA[
<iq type='set' id='auth2'>
  <query xmlns='jabber:iq:auth'>
    <username>bill</username>
    <password>Calli0pe</password>
    <resource>globe</resource>
  </query>
</iq>
]]></example>
    <p>Plaintext passwords are straightforward (obviously, characters that map to predefined XML entities MUST be escaped according to the rules defined in section 4.6 of the XML specification, and any non-US-ASCII characters MUST be encoded according to the encoding of XML streams as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note>, i.e., UTF-8 as defined in <span class="ref"><link url="http://tools.ietf.org/html/rfc3629">RFC 3629</link></span> <note>RFC 3629: UTF-8, a transformation format of ISO 10646 &lt;<link url="http://tools.ietf.org/html/rfc3629">http://tools.ietf.org/html/rfc3629</link>&gt;.</note>).</p>
    <p>The value of the &lt;digest/&gt; element MUST be computed according to the following algorithm:</p>
    <ol>
      <li>Concatenate the Stream ID received from the server with the password. <note>In Digest authentication, password characters that map to predefined XML entities SHOULD NOT be escaped as they are for plaintext passwords, but non-US-ASCII characters MUST be encoded as UTF-8 since the SHA-1 hashing algorithm operates on byte arrays.</note></li>
      <li>Hash the concatenated string according to the SHA1 algorithm, i.e., SHA1(concat(sid, password)).</li>
      <li>Ensure that the hash output is in hexidecimal format, not binary or base64.</li>
      <li>Convert the hash output to all lowercase characters.</li>
    </ol>
    <example caption="Client Provides Required Information (Digest)"><![CDATA[
<iq type='set' id='auth2'>
  <query xmlns='jabber:iq:auth'>
    <username>bill</username>
    <digest>48fc78be9ec8f86d8ce1c39c320c97c21d62334d</digest>
    <resource>globe</resource>
  </query>
</iq>
]]></example>
    <p>The character data shown in the &lt;digest/&gt; element is the output produced as a result of following the algorithm defined above when the stream ID is '3EE948B0' and the password is 'Calli0pe'.</p>
    <p>If the credentials provided match those known by the server, the client will be successfully authenticated.</p>
    <example caption="Server Informs Client of Successful Authentication"><![CDATA[
<iq type='result' id='auth2'/>
]]></example>
    <p>Alternatively, authentication may fail. Possible causes of failure include:</p>
    <ol>
      <li>The user provided incorrect credentials.</li>
      <li>There is a resource conflict (i.e., there is already an active session with that resource identifier associated with the same username). The RECOMMENDED behavior is for the server to terminate the existing session and create the new one; however, the server MAY provide the opposite behavior if desired, leading to a conflict error for the newly requested login.</li>
      <li>The user did not provide all of the required information (e.g., did not provide a username or resource).</li>
    </ol>
    <p>Although <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note> specifies that error stanzas SHOULD include the original XML sent, error stanzas qualified by the 'jabber:iq:auth' namespace SHOULD NOT do so given the sensitive nature of the information being exchanged.</p>
    <example caption="Server Informs Client of Failed Authentication (Incorrect Credentials)"><![CDATA[
<iq type='error' id='auth2'>
  <error code='401' type='auth'>
    <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
]]></example>
    <example caption="Server Informs Client of Failed Authentication (Resource Conflict)"><![CDATA[
<iq type='error' id='auth2'>
  <error code='409' type='cancel'>
    <conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
]]></example>
    <example caption="Server Informs Client of Failed Authentication (Required Information Not Provided)"><![CDATA[
<iq type='error' id='auth2'>
  <error code='406' type='modify'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
]]></example>
  </section2>
</section1>
<section1 topic="Stream Feature" anchor="streamfeature">
  <p><span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note> defines methods for advertising feature support during stream negotiation. It may be desirable for a server to advertise support for non-SASL authentication as a stream feature. The namespace for reporting support within &lt;stream:features/&gt; is "http://jabber.org/features/iq-auth". Upon receiving a stream header qualified by the 'jabber:client' namespace, a server that returns stream features SHOULD also announce support for non-SASL authentication by including the relevant stream feature. Exactly when a server advertises the iq-auth stream feature is up to the implementation or deployment (e.g., a server MAY advertise this feature only after successful TLS negotiation or if the channel is encrypted via the older SSL method). Obviously, this does not apply to servers that do not support stream features (e.g., older servers that do not comply with XMPP 1.0).</p>
  <example caption="Advertising non-SASL authentication as a stream feature"><![CDATA[
  <stream:features>
    <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
      <mechanism>DIGEST-MD5</mechanism>
      <mechanism>PLAIN</mechanism>
    </mechanisms>
    <auth xmlns='http://jabber.org/features/iq-auth'/>
  </stream:features>
]]></example>
  <p>A server SHOULD NOT advertise non-SASL authentication to another server (i.e., if the initial stream header was qualified by the 'jabber:server' namespace).</p>
</section1>
<section1 topic="Error Handling" anchor="errors">
  <p>As defined herein, the 'jabber:iq:auth' namespace supports both the old (HTTP-style) error codes and the extensible error classes and conditions specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc6120">RFC 6120</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note>. A compliant server or service implementation MUST support both old-style and new-style error handling. A compliant client implementation SHOULD support both.</p>
</section1>
<section1 topic="Expiration Date" anchor="expiration">
  <p>In accordance with Section 8 of <span class="ref"><link url="https://xmpp.org/extensions/xep-0001.html">XMPP Extension Protocols (XEP-0001)</link></span> <note>XEP-0001: XMPP Extension Protocols &lt;<link url="https://xmpp.org/extensions/xep-0001.html">https://xmpp.org/extensions/xep-0001.html</link>&gt;.</note>, on 2004-10-20 this document was advanced to a status of Final with the understanding that it would expire in six months. On 2006-09-13, the Jabber Council (now XMPP Council) changed the status of this document to Deprecated. The Jabber Council will review this document every six months to determine whether to change its status to Obsolete or to extend the expiration date for an additional six months; this process will continue until the document is obsoleted. For the latest expiration date, refer to the XEP Information block at the beginning of this document.</p>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>Use of SASL authentication can be more secure than the 'jabber:iq:auth' protocol, depending on which SASL mechanism is used. Because SASL provides greater flexibility and can provide stronger security, the 'jabber:iq:auth' protocol is now obsolete. If both client and server implement SASL, they MUST prefer SASL over the 'jabber:iq:auth' protocol. If a client attempts to authenticate using the 'jabber:iq:auth' namespace after an attempt at SASL authentication fails, the server MUST refuse the 'jabber:iq:auth' attempt by returning a &lt;policy-violation/&gt; stream error to the client.</p>
  <p>Client implementations MUST NOT make plaintext the default mechanism, and SHOULD warn the user that the plaintext mechanism is insecure. The plaintext mechanism SHOULD NOT be used unless the underlying stream is encrypted (using SSL or TLS) and the client has verified that the server certificate is signed by a trusted certification authority. A given domain MAY choose to disable plaintext logins if the stream is not properly encrypted, or disable them entirely. If a client implements the plaintext mechanism and a server allows both the digest mechanism and the plaintext mechanism when channel encryption is not in use, a downgrade attack is possible, in which a man-in-the-middle tricks the client into revealing the user's plaintext password.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>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 &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <section2 topic="Protocol Namespaces" anchor="registrar-ns">
    <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>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 &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> includes the 'jabber:iq:auth' namespace in its registry of protocol namespaces.</p>
  </section2>
  <section2 topic="Stream Features" anchor="registrar-stream">
    <p>The XMPP Registrar includes the 'http://jabber.org/features/iq-auth' namespace in its registry of stream feature namespaces.</p>
  </section2>
</section1>
<section1 topic="XML Schemas" anchor="schemas">
  <section2 topic="jabber:iq:auth" anchor="schemas-auth">
    <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='jabber:iq:auth'
    xmlns='jabber:iq:auth'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      NOTE WELL: Non-SASL Authentication via the jabber:iq:auth
      protocol has been superseded by SASL Authentication as
      defined in RFC 3920 and RFC 6120, and is now obsolete.

      For historical purposes, the protocol documented by this
      schema is defined in XEP-0078:

      http://www.xmpp.org/extensions/xep-0078.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='query'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='username' type='xs:string' minOccurs='0'/>
        <xs:choice>
          <xs:element name='password' type='xs:string' minOccurs='0'/>
          <xs:element name='digest' type='xs:string' minOccurs='0'/>
        </xs:choice>
        <xs:element name='resource' type='xs:string' minOccurs='0'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
]]></code>
  </section2>
  <section2 topic="Stream Feature" anchor="schemas-stream">
    <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/features/iq-auth'
    xmlns='http://jabber.org/features/iq-auth'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      NOTE WELL: Non-SASL Authentication via the jabber:iq:auth
      protocol has been superseded by SASL Authentication as
      defined in RFC 3920 and RFC 6120, and is now obsolete.

      For historical purposes, the protocol documented by this
      schema is defined in XEP-0078:

      http://www.xmpp.org/extensions/xep-0078.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='auth' type='empty'/>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
]]></code>
  </section2>
</section1>
</xep>
