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);
[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);
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}")>]
static member Authenticate : string * System.Net.WebRequest * System.Net.ICredentials -> System.Net.Authorization
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 değeridir.

-veya-

request, null değeridir.

-veya-

credentials, null değeridir.

Açıklamalar

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

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

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

Şunlara uygulanır