22 lines
762 B
C#
22 lines
762 B
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
|
|
|
|
namespace Shogi.UI.Pages.Home.Api
|
|
{
|
|
public class MsalMessageHandler : AuthorizationMessageHandler
|
|
{
|
|
public MsalMessageHandler(IAccessTokenProvider provider, NavigationManager navigation) : base(provider, navigation)
|
|
{
|
|
ConfigureHandler(
|
|
authorizedUrls: new[] { "https://api.lucaserver.space", "https://localhost:5001" },
|
|
scopes: new[] { "api://c1e94676-cab0-42ba-8b6c-9532b8486fff/DefaultScope" },
|
|
returnUrl: "https://localhost:3000");
|
|
}
|
|
|
|
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
|
{
|
|
return base.SendAsync(request, cancellationToken);
|
|
}
|
|
}
|
|
}
|