Share via


AuthorizationMessageHandler.ConfigureHandler Método

Definición

Configura este controlador para autorizar las solicitudes HTTP salientes mediante un token de acceso. El token de acceso solo se adjunta si al menos uno de authorizedUrls es una base de 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

Parámetros

authorizedUrls
IEnumerable<String>

Las direcciones base de las direcciones URL del punto de conexión a las que se asociará el token.

scopes
IEnumerable<String>

Lista de ámbitos que se van a usar al solicitar un token de acceso.

returnUrl
String

La dirección URL de devolución que se va a usar en caso de que haya un problema al aprovisionar el token y se necesite un redireccionamiento al proveedor de identidades.

Devoluciones

Este AuthorizationMessageHandlerobjeto .

Se aplica a