AuthenticationManager.Authenticate(String, WebRequest, ICredentials) メソッド

定義

注意事項

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

認証要求に応答できる最初のモジュールを検出するには、各登録済み認証モジュールを呼び出します。

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

パラメーター

challenge
String

インターネット リソースが返すチャレンジ。

request
WebRequest

認証チャレンジを開始した要求。

credentials
ICredentials

この要求に関連付けられている資格情報。

戻り値

承認試行の結果を格納する Authorization クラスのインスタンス。 チャレンジに応答する認証モジュールがない場合、このメソッドは null を返します。

属性

例外

.NET Core および .NET 5 以降のみ:すべての場合。

challengenullです。

または

requestnullです。

または

credentialsnullです。

注釈

メソッドは Authenticate 、いずれかのモジュールが IAuthenticationModule.Authenticate インスタンスで応答するまで、登録されている各認証モジュールで メソッドを Authorization 呼び出します。

返される最初 Authorization のインスタンスは、要求の認証に使用されます。 認証モジュールが要求を認証できない場合、 メソッドは Authenticate を返します null

認証モジュールは、 に登録されている順序で AuthenticationManager呼び出されます。

適用対象