first commit -push
This commit is contained in:
12
RobotNet.WebApp/Clients/WebAssemblyHubClient.cs
Normal file
12
RobotNet.WebApp/Clients/WebAssemblyHubClient.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
|
||||
using RobotNet.Clients;
|
||||
|
||||
namespace RobotNet.WebApp.Clients;
|
||||
|
||||
public abstract class WebAssemblyHubClient(IAccessTokenProvider tokenProvider, Uri uri) : HubClient(uri, async () =>
|
||||
{
|
||||
var tokenResult = await tokenProvider.RequestAccessToken();
|
||||
return tokenResult.TryGetToken(out var token) ? token.Value : "";
|
||||
})
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user