Switch Authentication to asynchronous streaming calls (#16)
* add base grpc service and swap auth service to streaming * remove Authorize from hub itself * remove unused usings * heave files server to net 7, add exception handling in grpc auth stream Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
@@ -3,6 +3,7 @@ using MareSynchronosShared.Authentication;
|
||||
using MareSynchronosShared.Data;
|
||||
using MareSynchronosShared.Metrics;
|
||||
using MareSynchronosShared.Protos;
|
||||
using MareSynchronosShared.Services;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
@@ -47,6 +48,7 @@ public class Startup
|
||||
}
|
||||
};
|
||||
|
||||
services.AddSingleton<GrpcAuthenticationService>();
|
||||
services.AddSingleton(new MareMetrics(new List<string> {
|
||||
}, new List<string>
|
||||
{
|
||||
@@ -72,6 +74,7 @@ public class Startup
|
||||
}, mareSettings.GetValue("DbContextPoolSize", 1024));
|
||||
|
||||
services.AddHostedService<CleanupService>();
|
||||
services.AddHostedService(p => p.GetService<GrpcAuthenticationService>());
|
||||
|
||||
services.AddAuthentication(options =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user