HttpChallengeHeaderValue HttpChallengeHeaderValue HttpChallengeHeaderValue HttpChallengeHeaderValue Class

Definition

Represents authentication information used in the Proxy-Authenticate and WWW-Authenticate HTTP header values.

public : sealed class HttpChallengeHeaderValue : IStringable, IHttpChallengeHeaderValue
public sealed class HttpChallengeHeaderValue : IStringable, IHttpChallengeHeaderValue
Public NotInheritable Class HttpChallengeHeaderValue Implements IStringable, IHttpChallengeHeaderValue
var httpChallengeHeaderValue = new httpChallengeHeaderValue(scheme);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The HttpChallengeHeaderValue class provides support for the authentication information in Authorization, ProxyAuthorization, WWW-Authenticate, and Proxy-Authenticate HTTP header values as defined in RFC 2616 by the IETF.

Constructors

HttpChallengeHeaderValue(String) HttpChallengeHeaderValue(String) HttpChallengeHeaderValue(String) HttpChallengeHeaderValue(String)

Initializes a new instance of the HttpChallengeHeaderValue class with the scheme to use for authorization.

public : HttpChallengeHeaderValue(Platform::String scheme)
public HttpChallengeHeaderValue(String scheme)
Public Sub New(scheme As String)
var httpChallengeHeaderValue = new httpChallengeHeaderValue(scheme);
Parameters
scheme
Platform::String String String String

The scheme to use for authorization.

See Also

HttpChallengeHeaderValue(String, String) HttpChallengeHeaderValue(String, String) HttpChallengeHeaderValue(String, String) HttpChallengeHeaderValue(String, String)

Initializes a new instance of the HttpChallengeHeaderValue class with the scheme to use for authorization and the SPNEGO token.

public : HttpChallengeHeaderValue(Platform::String scheme, Platform::String token)
public HttpChallengeHeaderValue(String scheme, String token)
Public Sub New(scheme As String, token As String)
var httpChallengeHeaderValue = new httpChallengeHeaderValue(scheme, token);
Parameters
scheme
Platform::String String String String

The scheme to use for authorization.

token
Platform::String String String String

The SPNEGO token to use with the Negotiate protocol scheme.

See Also

Properties

Parameters Parameters Parameters Parameters

Gets the credentials that contain the authentication information of the user agent for the resource being requested.

public : IVector<HttpNameValueHeaderValue> Parameters { get; }
public IList<HttpNameValueHeaderValue> Parameters { get; }
Public ReadOnly Property Parameters As IList<HttpNameValueHeaderValue>
var iList = httpChallengeHeaderValue.parameters;
Value
IVector<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue> IList<HttpNameValueHeaderValue>

The credentials that contain the authentication information.

Scheme Scheme Scheme Scheme

Gets the scheme to use for authentication.

public : Platform::String Scheme { get; }
public string Scheme { get; }
Public ReadOnly Property Scheme As string
var string = httpChallengeHeaderValue.scheme;
Value
Platform::String string string string

The scheme to use for authentication.

Token Token Token Token

The SPNEGO token to use with the Negotiate protocol scheme.

public : Platform::String Token { get; }
public string Token { get; }
Public ReadOnly Property Token As string
var string = httpChallengeHeaderValue.token;
Value
Platform::String string string string

The SPNEGO token.

Methods

Parse(String) Parse(String) Parse(String) Parse(String)

Converts a string to an HttpChallengeHeaderValue instance.

public : static HttpChallengeHeaderValue Parse(Platform::String input)
public static HttpChallengeHeaderValue Parse(String input)
Public Static Function Parse(input As String) As HttpChallengeHeaderValue
var httpChallengeHeaderValue = Windows.Web.Http.Headers.HttpChallengeHeaderValue.parse(input);
Parameters
input
Platform::String String String String

A string that represents authentication header value information.

Returns

Remarks

Below are exceptions that this function throws.

E_INVALIDARG

The input parameter is null (Nothing in Visual Basic).

The input parameter is not valid authentication header information.

ToString() ToString() ToString() ToString()

Returns a string that represents the current HttpChallengeHeaderValue object.

public : Platform::String ToString()
public string ToString()
Public Function ToString() As string
var string = httpChallengeHeaderValue.toString();
Returns
Platform::String string string string

A string that represents the current object.

TryParse(String, HttpChallengeHeaderValue) TryParse(String, HttpChallengeHeaderValue) TryParse(String, HttpChallengeHeaderValue) TryParse(String, HttpChallengeHeaderValue)

Determines whether a string is valid HttpChallengeHeaderValue information.

public : static Platform::Boolean TryParse(Platform::String input, HttpChallengeHeaderValue challengeHeaderValue)
public static bool TryParse(String input, HttpChallengeHeaderValue challengeHeaderValue)
Public Static Function TryParse(input As String, challengeHeaderValue As HttpChallengeHeaderValue) As bool
var bool = Windows.Web.Http.Headers.HttpChallengeHeaderValue.tryParse(input, challengeHeaderValue);
Parameters
input
Platform::String String String String

The string to validate.

Returns
Platform::Boolean bool bool bool

true if input is valid HttpChallengeHeaderValue information; otherwise, false.