AuthenticationSchemeSelector デリゲート
アセンブリ: System (system.dll 内)

Public Delegate Function AuthenticationSchemeSelector ( _ httpRequest As HttpListenerRequest _ ) As AuthenticationSchemes
public delegate AuthenticationSchemes AuthenticationSchemeSelector ( HttpListenerRequest httpRequest )
public delegate AuthenticationSchemes AuthenticationSchemeSelector ( HttpListenerRequest^ httpRequest )
/** @delegate */ public delegate AuthenticationSchemes AuthenticationSchemeSelector ( HttpListenerRequest httpRequest )
戻り値
指定したクライアント要求に使用する認証のメソッドを示す AuthenticationSchemes 値の 1 つ。

この種類のデリゲートは、要求の特性に基づいて認証方式を選択するために HttpListener インスタンスによって使用されます。
AuthenticationSchemeSelector デリゲートは、認証情報を提供していない各受信要求の HttpListenerRequest オブジェクトに渡されます。このデリゲートによって呼び出されたメソッドは、HttpListenerRequest オブジェクトおよび他の入手可能な情報を使用して、必要な認証方式を決定します。このデリゲートは、AuthenticationSchemeSelectorDelegate プロパティを使用して指定されます。

この種類のインスタンスを使用して AuthenticationSchemeSelectorDelegate プロパティを設定する例を次に示します。
// Set up a listener. HttpListener listener = new HttpListener(); HttpListenerPrefixCollection prefixes = listener.Prefixes; prefixes.Add(@"http://localhost:8080/"); prefixes.Add(@"http://contoso.com:8080/"); // Specify the authentication delegate. listener.AuthenticationSchemeSelectorDelegate = new AuthenticationSchemeSelector (AuthenticationSchemeForClient); // Start listening for requests and process them // synchronously. listener.Start();
前の例で AuthenticationSchemeSelector デリゲートによって呼び出されているメソッドの実装例を次に示します。
static AuthenticationSchemes AuthenticationSchemeForClient(HttpListenerRequest request) { Console.WriteLine("Client authentication protocol selection in progress..."); // Do not authenticate local machine requests. if (request.RemoteEndPoint.Address.Equals (IPAddress.Loopback)) { return AuthenticationSchemes.None; } else { return AuthenticationSchemes.IntegratedWindowsAuthentication; } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からAuthenticationSchemeSelector デリゲートを検索する場合は、下記のリンクをクリックしてください。

- AuthenticationSchemeSelector デリゲートのページへのリンク