AuthorizationMessageHandler.ConfigureHandler Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures this handler to authorize outbound HTTP requests using an access token. The access token is only attached if at least one of
authorizedUrls
is a base of 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
Parameters
- authorizedUrls
- IEnumerable<String>
The base addresses of endpoint URLs to which the token will be attached.
- scopes
- IEnumerable<String>
The list of scopes to use when requesting an access token.
- returnUrl
- String
The return URL to use in case there is an issue provisioning the token and a redirection to the identity provider is necessary.
Returns
This AuthorizationMessageHandler.