AuthenticationManager.Authenticate(String, WebRequest, ICredentials) Yöntem

Tanım

Dikkat

The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.

Kimlik doğrulama isteğine yanıt verebilen ilk modülü bulmak için her kayıtlı kimlik doğrulama modülünü çağırır.

public:
 static System::Net::Authorization ^ Authenticate(System::String ^ challenge, System::Net::WebRequest ^ request, System::Net::ICredentials ^ credentials);
public static System.Net.Authorization? Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);
[System.Obsolete("The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0009", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.Authorization? Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);
public static System.Net.Authorization Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);
static member Authenticate : string * System.Net.WebRequest * System.Net.ICredentials -> System.Net.Authorization
[<System.Obsolete("The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0009", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Authenticate : string * System.Net.WebRequest * System.Net.ICredentials -> System.Net.Authorization
Public Shared Function Authenticate (challenge As String, request As WebRequest, credentials As ICredentials) As Authorization

Parametreler

challenge
String

İnternet kaynağı tarafından döndürülen sınama.

request
WebRequest

Kimlik doğrulama sınamasını başlatan istek.

credentials
ICredentials

Bu istekle ilişkili kimlik bilgileri.

Döndürülenler

Yetkilendirme girişiminin Authorization sonucunu içeren sınıfın bir örneği. Sınamaya yanıt verecek bir kimlik doğrulama modülü yoksa, bu yöntem döndürür null.

Öznitelikler

Özel durumlar

Yalnızca .NET Core ve .NET 5+ : Her durumda.

challenge, null'e eşittir.

-veya-

request, null'e eşittir.

-veya-

credentials, null'e eşittir.

Açıklamalar

yöntemi, Authenticate modülden biri bir IAuthenticationModule.Authenticate örnekle yanıt verene kadar her kayıtlı kimlik doğrulama modülünde yöntemini çağırırAuthorization.

Döndürülen ilk Authorization örnek isteğin kimliğini doğrulamak için kullanılır. İsteğin Authenticate kimliğini doğrulayabilen bir kimlik doğrulama modülü yoksa yöntemi döndürür null.

Kimlik doğrulama modülleri, ile kaydedildikleri sırayla çağrılır AuthenticationManager.

Şunlara uygulanır