HotspotProfile 架构

HotspotProfile 架构定义的元素用于描述使用无线 Internet 服务提供商漫游 (WISPr) 协议的 Wi-Fi 热点的登录凭据。 所有元素都位于命名空间 http://www.microsoft.com/networking/WLAN/HotspotProfile/v1 中。 并非所有元素都在每个配置文件中,因为某些元素是可选的。

完整的 HotspotProfile 架构如下:

<?xml version="1.0" encoding="UTF-8"?>  
<xs:schema targetNamespace="http://www.microsoft.com/networking/WLAN/HotspotProfile/v1"  
    elementFormDefault="qualified"  
    xmlns="http://www.microsoft.com/networking/WLAN/HotspotProfile/v1"  
    xmlns:xs="http://www.w3.org/2001/XMLSchema">  
  
  <xs:element name="BasicAuth">  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="UserName" type="xs:token"/>  
        <xs:element name="Password" type="xs:token"/>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
  
  <xs:element name="ExtAuth">  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="ExtensionId" type="xs:token"/>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
  
  <xs:element name="TrustedDomains">  
    <xs:annotation>  
      <xs:documentation xml:lang="en">  
        The element contains a set of host names that are trusted for providing credentials over HTTPS.  
        A domain name is either a fully qualified name such as hotspot.contoso.com  
        or a wildcard such as .contoso.com to refer to all hosts under the given domain name.  
      </xs:documentation>  
    </xs:annotation>  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="TrustedDomain" maxOccurs="unbounded" type="xs:token"/>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
  
  <xs:element name="SSIDConfig">  
    <xs:annotation>  
      <xs:documentation xml:lang="en">  
        The element contains a set of additional SSID's that are handled by this profile  
        to reduce the number of SSID's in the WLAN profile store.  
        Windows will not auto-connect to these SSID's until a user manually connects  
        and sets the auto-connect flag for a specific SSID.  
      </xs:documentation>  
    </xs:annotation>  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="SSID" maxOccurs="250">  
          <xs:complexType>  
            <xs:choice>  
              <xs:element name="hex">  
                <xs:simpleType>  
                  <xs:restriction base="xs:hexBinary">  
                    <xs:minLength value="1" />  
                    <xs:maxLength value="32" />  
                  </xs:restriction>  
                </xs:simpleType>  
              </xs:element>  
              <xs:element name="hexPrefix">  
                <xs:simpleType>  
                  <xs:restriction base="xs:hexBinary">  
                    <xs:minLength value="4" />  
                    <xs:maxLength value="32" />  
                  </xs:restriction>  
                </xs:simpleType>  
              </xs:element>  
              <xs:element name="name">  
                <xs:simpleType>  
                  <xs:restriction base="xs:string">  
                    <xs:minLength value="1" />  
                    <xs:maxLength value="32" />  
                  </xs:restriction>  
                </xs:simpleType>  
              </xs:element>  
              <xs:element name="namePrefix">  
                <xs:simpleType>  
                  <xs:restriction base="xs:string">  
                    <xs:minLength value="4" />  
                    <xs:maxLength value="32" />  
                  </xs:restriction>  
                </xs:simpleType>  
              </xs:element>  
            </xs:choice>  
          </xs:complexType>  
        </xs:element>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
  
  <xs:element name="HotspotProfile">  
    <xs:complexType>  
      <xs:sequence>  
        <xs:choice>  
          <xs:sequence>  
            <xs:element ref="BasicAuth"/>  
            <xs:element ref="TrustedDomains"/>  
          </xs:sequence>  
          <xs:sequence>  
            <xs:element ref="ExtAuth"/>  
            <xs:element ref="TrustedDomains" minOccurs="0"/>  
          </xs:sequence>  
        </xs:choice>  
        <xs:element name="UserAgent" minOccurs="0" type="xs:token"/>  
        <xs:element ref="SSIDConfig" minOccurs="0"/>  
  
        <!-- extension point -->  
        <xs:any processContents="lax" namespace="##other" minOccurs="0" maxOccurs="unbounded"/>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
</xs:schema>

下表列出了此架构中的所有元素,并按名称的字母顺序排序。

元素 说明
BasicAuth

包含 WISPr 身份验证所需的用户名和密码。 使用 BasicAuth 允许使用一组静态凭据;使用 ExtAuth 使应用为 WISPr 身份验证生成凭据。

ExtAuth

包含用于通过应用程序 (处理 WISPr 身份验证的参数,而不是通过 BasicAuth ) 指定静态用户名和密码。

ExtensionId

将调用以处理 WISPr 身份验证的应用的包系列名称。

HotspotProfile

为 Wi-Fi 热点定义属性和登录凭据。 HotspotProfile 是使用无线 Internet 服务提供商漫游 (WISPr) 协议的 Wi-Fi 热点配置文件的唯一根元素。

密码

用于 WISPr 身份验证的密码。

SSID

此配置文件处理的其他 SSID。

SSIDConfig

包含一组由此配置文件处理的附加 Ssid,以减少 WLAN 配置文件存储中 Ssid 的数目。 在用户手动连接一次之前,Windows 不会连接到这些 ssid。 新创建的配置文件将继承此配置文件中的 HotspotAuth 设置。

TrustedDomain

受信任的主机名,可通过 HTTPS 提供凭据。 可以是完全限定名称 (如 hotspot.contoso.com) 或通配符,以引用给定域名下的所有主机 (如 contoso.com) 。

TrustedDomains

包含一个或多个主机名的集合,这些名称受信任,可以通过 HTTPS 提供凭据。 可以是完全限定名称 (如 hotspot.contoso.com) 或通配符,以引用给定域名下的所有主机 (如 contoso.com) 。

UserAgent

自定义 HTTP 用户代理字符串,用于支持操作员特定的用户代理筛选。 此元素为可选元素。

UserName

要用于 WISPr 身份验证的用户名。

hex

以十六进制格式定义无线 LAN 的 SSID。

hexPrefix

定义一类无线 Lan,其 Ssid 以提供的字节开头。

name

以字母数字格式定义无线 LAN 的 SSID。

namePrefix

定义一类无线 Lan,其 Ssid 以提供的字符开头。