Skip to content

Commit

Permalink
move Settings from domain to identity
Browse files Browse the repository at this point in the history
  • Loading branch information
samanazadi1996 committed Jun 8, 2024
1 parent e06154a commit 7562558
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 28 deletions.

This file was deleted.

12 changes: 0 additions & 12 deletions Source/Src/Core/CleanArchitecture.Domain/Settings/JWTSettings.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\CleanArchitecture.Application\CleanArchitecture.Application.csproj" />
<ProjectReference Include="..\..\Core\CleanArchitecture.Domain\CleanArchitecture.Domain.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanArchitecture.Application.Interfaces.UserInterfaces;
using CleanArchitecture.Application.Wrappers;
using CleanArchitecture.Domain.Settings;
using CleanArchitecture.Infrastructure.Identity.Contexts;
using CleanArchitecture.Infrastructure.Identity.Models;
using CleanArchitecture.Infrastructure.Identity.Services;
using CleanArchitecture.Infrastructure.Identity.Settings;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
Expand Down Expand Up @@ -37,7 +37,6 @@ public static IServiceCollection AddIdentityInfrastructure(this IServiceCollecti
services.AddTransient<IAccountServices, AccountServices>();

var identitySettings = configuration.GetSection(nameof(IdentitySettings)).Get<IdentitySettings>();
services.AddSingleton(identitySettings);

var jwtSettings = configuration.GetSection(nameof(JWTSettings)).Get<JWTSettings>();
services.AddSingleton(jwtSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using CleanArchitecture.Application.Interfaces;
using CleanArchitecture.Application.Interfaces.UserInterfaces;
using CleanArchitecture.Application.Wrappers;
using CleanArchitecture.Domain.Settings;
using CleanArchitecture.Infrastructure.Identity.Models;
using CleanArchitecture.Infrastructure.Identity.Settings;
using Microsoft.AspNetCore.Identity;
using Microsoft.IdentityModel.Tokens;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace CleanArchitecture.Infrastructure.Identity.Settings;

public class IdentitySettings
{
public bool PasswordRequireDigit { get; set; }
public int PasswordRequiredLength { get; set; }
public bool PasswordRequireNonAlphanumic { get; set; }
public bool PasswordRequireUppercase { get; set; }
public bool PasswordRequireLowercase { get; set; }
public bool RequireUniqueEmail { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace CleanArchitecture.Infrastructure.Identity.Settings;

#pragma warning disable
public class JWTSettings
{
public string Key { get; set; }
public string Issuer { get; set; }
public string Audience { get; set; }
public double DurationInMinutes { get; set; }
}
#pragma warning disable

0 comments on commit 7562558

Please sign in to comment.