AuthorizationMessageHandler.ConfigureHandler Metodo

Definizione

Configura questo gestore per autorizzare le richieste HTTP in uscita usando un token di accesso. Il token di accesso è associato solo se almeno uno di authorizedUrls è una base di RequestUri.

public Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler ConfigureHandler (System.Collections.Generic.IEnumerable<string> authorizedUrls, System.Collections.Generic.IEnumerable<string> scopes = default, string returnUrl = default);
public Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler ConfigureHandler (System.Collections.Generic.IEnumerable<string> authorizedUrls, System.Collections.Generic.IEnumerable<string>? scopes = default, string? returnUrl = default);
member this.ConfigureHandler : seq<string> * seq<string> * string -> Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthorizationMessageHandler
Public Function ConfigureHandler (authorizedUrls As IEnumerable(Of String), Optional scopes As IEnumerable(Of String) = Nothing, Optional returnUrl As String = Nothing) As AuthorizationMessageHandler

Parametri

authorizedUrls
IEnumerable<String>

Indirizzi di base degli URL dell'endpoint a cui verrà collegato il token.

scopes
IEnumerable<String>

Elenco di ambiti da usare quando si richiede un token di accesso.

returnUrl
String

L'URL restituito da usare nel caso in cui si verifichi un problema di provisioning del token e è necessario un reindirizzamento al provider di identità.

Restituisce

Oggetto AuthorizationMessageHandler.

Si applica a