AuthenticationManager.Authenticate(String, WebRequest, ICredentials) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Attenzione
The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.
Chiama ogni modulo di autenticazione registrato per trovare il primo modulo in grado di rispondere alla richiesta di autenticazione.
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
Parametri
- challenge
- String
La richiesta restituita dalla risorsa Internet.
- request
- WebRequest
Richiesta che ha avviato la richiesta di autenticazione.
- credentials
- ICredentials
Credenziali associate a questa richiesta.
Valori restituiti
Istanza della Authorization classe contenente il risultato del tentativo di autorizzazione. Se non è presente alcun modulo di autenticazione per rispondere alla richiesta di verifica, questo metodo restituisce null.
- Attributi
Eccezioni
Solo .NET Core e .NET 5+: in tutti i casi.
Commenti
Il Authenticate metodo chiama il IAuthenticationModule.Authenticate metodo in ogni modulo di autenticazione registrato fino a quando uno del modulo non risponde con un'istanza Authorization di .
La prima Authorization istanza restituita viene usata per autenticare la richiesta. Se nessun modulo di autenticazione può autenticare la richiesta, il Authenticate metodo restituisce null.
I moduli di autenticazione vengono chiamati nell'ordine in cui vengono registrati con .AuthenticationManager