Removed old manual access token checking and switched to asp.net jwt handling. Removed old console subscriber handling and switched to full signal r solution + asp.net core auth
This commit is contained in:
28
MoonlightServers.ApiServer/Services/NodeBootService.cs
Normal file
28
MoonlightServers.ApiServer/Services/NodeBootService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace MoonlightServers.ApiServer.Services;
|
||||
|
||||
public class NodeBootService : IHostedLifecycleService
|
||||
{
|
||||
public async Task StartedAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// TODO: Add node boot calls here
|
||||
}
|
||||
|
||||
#region Unused
|
||||
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
public Task StartingAsync(CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
public Task StoppedAsync(CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
public Task StoppingAsync(CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -32,7 +32,8 @@ public class NodeService
|
||||
node.Token
|
||||
)),
|
||||
SecurityAlgorithms.HmacSha256
|
||||
)
|
||||
),
|
||||
Audience = node.TokenId
|
||||
};
|
||||
|
||||
var securityToken = jwtSecurityTokenHandler.CreateJwtSecurityToken(securityTokenDescriptor);
|
||||
|
||||
Reference in New Issue
Block a user