HttpChallengeHeaderValue 类

定义

表示 在 Proxy-Authenticate 和 WWW-Authenticate HTTP 标头值中使用的 身份验证 信息。

public ref class HttpChallengeHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpChallengeHeaderValueFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpChallengeHeaderValue final : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpChallengeHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpChallengeHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpChallengeHeaderValueFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpChallengeHeaderValue : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpChallengeHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpChallengeHeaderValue : IStringable
function HttpChallengeHeaderValue(scheme, token)
Public NotInheritable Class HttpChallengeHeaderValue
Implements IStringable
继承
Object Platform::Object IInspectable HttpChallengeHeaderValue
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

HttpChallengeHeaderValue 类支持 IETF 在 RFC 2616 中定义的 AuthorizationProxyAuthorizationWWW-AuthenticateProxy-Authenticate HTTP 标头值中的身份验证信息。

构造函数

HttpChallengeHeaderValue(String)

使用要用于授权的方案初始化 HttpChallengeHeaderValue 类的新实例。

HttpChallengeHeaderValue(String, String)

使用要用于授权的方案和 SPNEGO 令牌初始化 HttpChallengeHeaderValue 类的新实例。

属性

Parameters

获取凭据,这些凭据包含所请求资源的用户代理的身份验证信息。

Scheme

获取用于身份验证的方案。

Token

要与 Negotiate 协议方案一起使用的 SPNEGO 令牌。

方法

Parse(String)

将字符串转换为 HttpChallengeHeaderValue 实例。

ToString()

返回表示当前 HttpChallengeHeaderValue 对象的字符串。

TryParse(String, HttpChallengeHeaderValue)

确定字符串是否为有效的 HttpChallengeHeaderValue 信息。

适用于

另请参阅