AuthenticationHeaderValue 类

定义

表示 Authorization、ProxyAuthorization、WWW-Authneticate 和 Proxy-Authenticate 标头值中的验证信息。Represents authentication information in Authorization, ProxyAuthorization, WWW-Authenticate, and Proxy-Authenticate header values.

public ref class AuthenticationHeaderValue : ICloneable
public class AuthenticationHeaderValue : ICloneable
type AuthenticationHeaderValue = class
    interface ICloneable
Public Class AuthenticationHeaderValue
Implements ICloneable
继承
AuthenticationHeaderValue
实现

注解

AuthenticationHeaderValue 类支持由 IETF 在RFC 2616中定义的授权、PROXYAUTHORIZATION、WWW 身份验证和代理身份验证 HTTP 标头值。The AuthenticationHeaderValue class provides support for the Authorization, ProxyAuthorization, WWW-Authenticate, and Proxy-Authenticate HTTP header values as defined in RFC 2616 by the IETF.

构造函数

AuthenticationHeaderValue(String)

初始化 AuthenticationHeaderValue 类的新实例。Initializes a new instance of the AuthenticationHeaderValue class.

AuthenticationHeaderValue(String, String)

初始化 AuthenticationHeaderValue 类的新实例。Initializes a new instance of the AuthenticationHeaderValue class.

属性

Parameter

获取包含所请求资源的用户代理的身份验证信息的凭据。Gets the credentials containing the authentication information of the user agent for the resource being requested.

Scheme

获取用于身份验证的方案。Gets the scheme to use for authorization.

方法

Equals(Object)

确定指定的 Object 是否等于当前的 AuthenticationHeaderValue 对象。Determines whether the specified Object is equal to the current AuthenticationHeaderValue object.

GetHashCode()

充当 AuthenticationHeaderValue 对象的哈希函数。Serves as a hash function for an AuthenticationHeaderValue object.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Parse(String)

将字符串转换为 AuthenticationHeaderValue 实例。Converts a string to an AuthenticationHeaderValue instance.

ToString()

返回表示当前 AuthenticationHeaderValue 对象的字符串。Returns a string that represents the current AuthenticationHeaderValue object.

TryParse(String, AuthenticationHeaderValue)

确定一个字符串是否为有效的 AuthenticationHeaderValue 信息。Determines whether a string is valid AuthenticationHeaderValue information.

显式接口实现

ICloneable.Clone()

创建作为当前 AuthenticationHeaderValue 实例副本的新对象。Creates a new object that is a copy of the current AuthenticationHeaderValue instance.

适用于