✨ Pusher service
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using DysonNetwork.Shared.Cache;
|
||||
using DysonNetwork.Shared.Geo;
|
||||
using DysonNetwork.Shared.GeoIp;
|
||||
|
||||
namespace DysonNetwork.Pass.Account;
|
||||
|
||||
|
@@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using NodaTime;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DysonNetwork.Pass.Account;
|
||||
using DysonNetwork.Shared.Geo;
|
||||
using DysonNetwork.Shared.GeoIp;
|
||||
|
||||
namespace DysonNetwork.Pass.Auth;
|
||||
|
||||
|
@@ -4,9 +4,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DysonNetwork.Pass.Auth;
|
||||
|
||||
public class AuthServiceGrpc(AuthService authService, AppDatabase db) : Shared.Proto.AuthService
|
||||
public class AuthServiceGrpc(AuthService authService, AppDatabase db) : Shared.Proto.AuthService.AuthServiceBase
|
||||
{
|
||||
public async Task<Shared.Proto.AuthSession> Authenticate(AuthenticateRequest request, ServerCallContext context)
|
||||
public override async Task<Shared.Proto.AuthSession> Authenticate(AuthenticateRequest request, ServerCallContext context)
|
||||
{
|
||||
if (!authService.ValidateToken(request.Token, out var sessionId))
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using System.Net;
|
||||
using DysonNetwork.Pass.Account;
|
||||
using DysonNetwork.Pass.Auth;
|
||||
using DysonNetwork.Pass.Permission;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Prometheus;
|
||||
@@ -68,6 +69,7 @@ public static class ApplicationConfiguration
|
||||
public static WebApplication ConfigureGrpcServices(this WebApplication app)
|
||||
{
|
||||
app.MapGrpcService<AccountServiceGrpc>();
|
||||
app.MapGrpcService<AuthServiceGrpc>();
|
||||
|
||||
return app;
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ using DysonNetwork.Pass.Auth.OidcProvider.Services;
|
||||
using DysonNetwork.Pass.Handlers;
|
||||
using DysonNetwork.Pass.Wallet.PaymentHandlers;
|
||||
using DysonNetwork.Shared.Cache;
|
||||
using DysonNetwork.Shared.Geo;
|
||||
using DysonNetwork.Shared.GeoIp;
|
||||
|
||||
namespace DysonNetwork.Pass.Startup;
|
||||
|
||||
@@ -53,6 +53,7 @@ public static class ServiceCollectionExtensions
|
||||
|
||||
// Register gRPC services
|
||||
services.AddScoped<AccountServiceGrpc>();
|
||||
services.AddScoped<AuthServiceGrpc>();
|
||||
|
||||
// Register OIDC services
|
||||
services.AddScoped<OidcService, GoogleOidcService>();
|
||||
|
@@ -1,12 +0,0 @@
|
||||
namespace DysonNetwork.Pass;
|
||||
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
Reference in New Issue
Block a user