AuthenticationHeaderValue Constructors

Definitie

Initialiseert een nieuw exemplaar van de AuthenticationHeaderValue klasse.

Overloads

Name Description
AuthenticationHeaderValue(String)

Initialiseert een nieuw exemplaar van de AuthenticationHeaderValue klasse.

AuthenticationHeaderValue(String, String)

Initialiseert een nieuw exemplaar van de AuthenticationHeaderValue klasse.

AuthenticationHeaderValue(String)

Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs

Initialiseert een nieuw exemplaar van de AuthenticationHeaderValue klasse.

public:
 AuthenticationHeaderValue(System::String ^ scheme);
public AuthenticationHeaderValue(string scheme);
new System.Net.Http.Headers.AuthenticationHeaderValue : string -> System.Net.Http.Headers.AuthenticationHeaderValue
Public Sub New (scheme As String)

Parameters

scheme
String

Het schema dat moet worden gebruikt voor autorisatie.

Opmerkingen

Voorbeeld:

HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(ACCESS_TOKEN);
Dim client = New HttpClient()
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(ACCESS_TOKEN)

Hiermee wordt de volgende header geproduceerd:

Authorization: ACCESS_TOKEN

Van toepassing op

AuthenticationHeaderValue(String, String)

Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs
Bron:
AuthenticationHeaderValue.cs

Initialiseert een nieuw exemplaar van de AuthenticationHeaderValue klasse.

public:
 AuthenticationHeaderValue(System::String ^ scheme, System::String ^ parameter);
public AuthenticationHeaderValue(string scheme, string parameter);
public AuthenticationHeaderValue(string scheme, string? parameter);
new System.Net.Http.Headers.AuthenticationHeaderValue : string * string -> System.Net.Http.Headers.AuthenticationHeaderValue
Public Sub New (scheme As String, parameter As String)

Parameters

scheme
String

Het schema dat moet worden gebruikt voor autorisatie.

parameter
String

De referenties met de verificatiegegevens van de gebruikersagent voor de resource die wordt aangevraagd.

Opmerkingen

Voorbeeld:

HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ACCESS_TOKEN);
Dim client = new HttpClient()
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ACCESS_TOKEN)

Hiermee wordt de volgende header geproduceerd:

Authorization: Bearer ACCESS_TOKEN

Van toepassing op