mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:37:22 +01:00
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:
parent
d37c1208fe
commit
c98e2b2dd6
20 changed files with 313 additions and 159 deletions
|
|
@ -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 =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue