Skip to content

Commit

Permalink
removed redis dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEggenberger committed May 25, 2024
1 parent 0741340 commit 1c46899
Show file tree
Hide file tree
Showing 58 changed files with 70 additions and 368 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events;
using Shared.Features.Domain;
using Shared.Features.DomainKernel;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain.Exceptions;
using Shared.Features.DomainKernel;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Exceptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events;
using Shared.Features.Domain;
using Shared.Features.DomainKernel;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Components;
using Modules.Channels.Web.Shared.DTOs.ChannelAggregate;
using Shared.Client;

namespace Modules.Channels.Web.Client.Components
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using Blazored.Modal;
using FluentValidation.Results;
using Microsoft.AspNetCore.Components;
using Modules.Channels.Web.Shared.DTOs.ChannelAggregate;
using Shared.Client;
using Shared.Kernel.BuildingBlocks.Services.Http;

namespace Modules.Channels.Web.Web.Client.Modals
namespace Modules.Channels.Web.Web.Client.Modals
{
//public partial class CreateChannelModal : BaseComponent
//{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries;
using Shared.Kernel.BuildingBlocks.Authorization.Attributes;
using Shared.Kernel.BuildingBlocks.Auth.Constants;
using Modules.Channels.Web.Shared.DTOs.ChannelAggregate;

namespace Modules.Channels.Web.Server.Controllers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using System.Threading.Tasks;

namespace Modules.LandingPages.Web.Server.Components
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
using System.Threading.Tasks;

namespace Modules.LandingPages.Web.Server.Components
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Blazored.Modal;
using Blazored.Modal.Services;
using Microsoft.AspNetCore.Components;
using Modules.LandingPages.Web.Server.Components;

namespace Modules.LandingPages.Web.Server
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using Blazored.Modal;
using Blazored.Modal.Services;
using Microsoft.AspNetCore.Components;
using Modules.LandingPages.Web.Server.Components;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Modules.LandingPages.Web.Server.Pages
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Blazored.Modal.Services;
using Blazored.Modal;
using Microsoft.AspNetCore.Components;
using Modules.LandingPages.Web.Server.Components;

namespace Modules.LandingPages.Web.Server.Pages
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate;
using Shared.Features.Messaging.Query;
using Shared.Features.Messaging.Query;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.Aplication.Queries
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using Shared.Kernel.BuildingBlocks.Authorization;

namespace Modules.Subscriptions.Features.DomainFeatures.SubscriptionAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Modules.Subscriptions.Features.Infrastructure.StripePayments;
using Shared.Features.Modules.Configuration;
using Shared.Kernel.BuildingBlocks.Auth;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;

namespace Modules.Subscriptions.Features.Infrastructure.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Modules.Subscriptions.Features.Infrastructure.Configuration;
using Modules.Subscriptions.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;
using Shared.Kernel.BuildingBlocks.Auth;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using Stripe.Checkout;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Kernel.BuildingBlocks.Auth;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;

namespace Modules.Subscriptions.Features.Infrastructure.StripePayments
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Mvc;

namespace Modules.Subscriptions.Web.Server.Controllers
namespace Modules.Subscriptions.Web.Server.Controllers
{
//[Route("api/[controller]")]
//[ApiController]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate;
using Shared.Features.Messaging.Query;
using Shared.Features.Messaging.Query;
using System;
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate;
using Shared.Features.Messaging.Query;
using Shared.Features.Messaging.Query;
using System;

namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate.Application.Queries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate;
using Modules.TenantIdentity.Features.Infrastructure.EFCore;
using Modules.TenantIdentity.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Query;
using System;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Features.DomainKernel.Attributes;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;

namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;

namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Shared.Features.Domain.Exceptions;
using Shared.Features.DomainKernel;
using System;
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity;
using Modules.TenantIdentity.Features.Infrastructure.EFCore.Configuration.UserAggregate;
using Shared.Features.DomainKernel.Exceptions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shared.Features.EFCore.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using Shared.Kernel.BuildingBlocks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Modules.TenantIdentity.IntegrationEvents
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Shared.SharedKernel.Exstensions;
using Shared.Kernel.BuildingBlocks.Auth.Constants;
using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate;
using Shared.Kernel.Extensions.ClaimsPrincipal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Modules.TenantIdentity.Features.Infrastructure.Configuration;
using Shared.Features.Modules;
using Shared.Kernel.BuildingBlocks.Auth.Constants;
using Shared.Kernel.BuildingBlocks.Authorization.Services;
using System.Reflection;
using System.Security.Claims;
using Shared.Features.Modules.Configuration;
Expand All @@ -25,40 +23,39 @@ public class TenantIdentityModuleStartup : IModuleStartup
public Assembly FeaturesAssembly { get; } = typeof(TenantIdentityModuleStartup).Assembly;
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddControllers().AddApplicationPart(typeof(TenantIdentityModuleStartup).Assembly);
services.AddSignalR();
services.AddSingleton<OpenIdConnectPostConfigureOptions>();
services.AddScoped<UserClaimsPrincipalFactory<ApplicationUser>>();

services.RegisterModuleConfiguration<TenantIdentityConfiguration, TenantIdentityConfigurationValidator>(configuration);

services.AddSingleton<OpenIdConnectPostConfigureOptions>();
//services.AddScoped<IUserResolver, UserResolver>();

services.Configure<SecurityStampValidatorOptions>(options =>
{
options.ValidationInterval = TimeSpan.FromSeconds(0);
});

services.AddDbContext<TenantIdentityDbContext>();

var tenantIdentityConfiguration = services.BuildServiceProvider().GetRequiredService<TenantIdentityConfiguration>();

AuthenticationBuilder authenticationBuilder = services.AddAuthentication(options =>
{
options.DefaultScheme = IdentityConstants.ApplicationScheme;
options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
options.DefaultScheme = AuthConstant.ApplicationAuthenticationScheme;
options.DefaultSignInScheme = AuthConstant.ApplicationAuthenticationScheme;
})
.AddLinkedIn(options =>
{
options.ClientId = "test";
options.ClientSecret = "test";
options.ClientId = tenantIdentityConfiguration.LinkedinClientId;
options.ClientSecret = tenantIdentityConfiguration.LinkedinClientSecret;
})
.AddMicrosoftAccount(options =>
{
options.ClientId = "test";
options.ClientSecret = "test";
options.ClientId = tenantIdentityConfiguration.MicrosoftClientId;
options.ClientSecret = tenantIdentityConfiguration.MicrosoftClientSecret;
})
.AddGoogle(options =>
{
options.ClientId = configuration["SocialLogins:Google:Web.ClientId"];
options.ClientSecret = configuration["SocialLogins:Google:Web.ClientSecret"];
options.ClientId = tenantIdentityConfiguration.GoogleClientId;
options.ClientSecret = tenantIdentityConfiguration.GoogleClientSecret;
options.Scope.Add("profile");
options.Events.OnCreatingTicket = (context) =>
{
Expand Down
5 changes: 0 additions & 5 deletions Source/Shared/Client/BaseComponent.razor.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using Microsoft.AspNetCore.Components;
using Shared.Kernel.BuildingBlocks.Services.Http;
using Shared.Kernel.BuildingBlocks.Services.ModelValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shared.Client
{
Expand Down
3 changes: 0 additions & 3 deletions Source/Shared/Features/EFCore/BaseDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shared.Features.Messaging.DomainEvent;
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Features.EFCore.Configuration;
using Shared.Features.EFCore.MultiTenancy;
using Shared.Features.EFCore.MultiTenancy.Exceptions;
using Shared.Kernel.BuildingBlocks;
using Shared.SharedKernel.Interfaces;
using SharedKernel.Interfaces;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Shared.Features.Domain;
using Shared.Features.DomainKernel;
using Shared.Features.DomainKernel.Attributes;
using System.Reflection;

namespace Shared.Features.EFCore.MultiTenancy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Shared.Features.Domain;
using Shared.Kernel.BuildingBlocks;

namespace Shared.Features.Messaging.DomainEvent
{
Expand Down
8 changes: 0 additions & 8 deletions Source/Shared/Features/RedisCache/RedisCacheConfiguration.cs

This file was deleted.

21 changes: 0 additions & 21 deletions Source/Shared/Features/RedisCache/Registrator.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shared.Kernel.BuildingBlocks;
using Shared.Kernel.BuildingBlocks.Auth;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;
using Shared.Kernel.Extensions.ClaimsPrincipal;

Expand Down
7 changes: 0 additions & 7 deletions Source/Shared/Features/SignalR/NotificationHubService.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using Microsoft.AspNetCore.SignalR;
using Shared.Kernel.Constants;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Shared.Features.SignalR
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Shared.Kernel.BuildingBlocks.Auth.Constants
{
public class AuthConstant
{
public const string ApplicationAuthenticationScheme = nameof(ApplicationAuthenticationScheme);
}
}
Loading

0 comments on commit 1c46899

Please sign in to comment.