AuthorizationMessageHandler.ConfigureHandler Metoda

Definicja

Konfiguruje tę procedurę obsługi w celu autoryzowania wychodzących żądań HTTP przy użyciu tokenu dostępu. Token dostępu jest dołączany tylko wtedy, gdy co najmniej jedna z nich authorizedUrls jest bazą .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

Parametry

authorizedUrls
IEnumerable<String>

Podstawowe adresy URL punktów końcowych, do których zostanie dołączony token.

scopes
IEnumerable<String>

Lista zakresów do użycia podczas żądania tokenu dostępu.

returnUrl
String

Zwracany adres URL używany w przypadku wystąpienia problemu z aprowizacją tokenu i konieczne jest przekierowanie do dostawcy tożsamości.

Zwraca

To AuthorizationMessageHandler.

Dotyczy