refactor: rename files and update namespaces for consistency
This commit is contained in:
parent
4d078906db
commit
f078047b68
@ -2,7 +2,7 @@ using System.Collections.Immutable;
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Abstractions;
|
namespace Suspectus.Gandalf.Abstractions;
|
||||||
|
|
||||||
public partial class Invoker
|
public partial class Invoker
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Abstractions;
|
namespace Suspectus.Gandalf.Abstractions;
|
||||||
|
|
||||||
public class InvokerContext
|
public class InvokerContext
|
||||||
{
|
{
|
||||||
@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<RootNamespace>Suspectus.GandalfReborn.Abstractions</RootNamespace>
|
<RootNamespace>Suspectus.Gandalf.Abstractions</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public class AuthCodeRequestCommand : IGrCommand<Result<AuthCodeDto>>
|
public class AuthCodeRequestCommand : IGrCommand<Result<AuthCodeDto>>
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public class CreateAuthCodeCommand : IGrCommand<Result<AuthCodeDto>>
|
public class CreateAuthCodeCommand : IGrCommand<Result<AuthCodeDto>>
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public class CreateTokensCommand : IGrCommand<Result<TokenDto>>
|
public class CreateTokensCommand : IGrCommand<Result<TokenDto>>
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public class HashPasswordCommand : IGrCommand<Result<string>>
|
public class HashPasswordCommand : IGrCommand<Result<string>>
|
||||||
{
|
{
|
||||||
@ -1,5 +1,5 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public interface IGrCommand<out T> : IRequest<T>;
|
public interface IGrCommand<out T> : IRequest<T>;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Commands;
|
namespace Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
public class RegisterCommand : IGrCommand<Result<SubjectEntity>>
|
public class RegisterCommand : IGrCommand<Result<SubjectEntity>>
|
||||||
{
|
{
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Controllers;
|
namespace Suspectus.Gandalf.Api.Controllers;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Extensions;
|
namespace Suspectus.Gandalf.Api.Extensions;
|
||||||
|
|
||||||
public static class ResultExtensions
|
public static class ResultExtensions
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Commands;
|
namespace Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
|
|
||||||
public interface IGrCommandHandler<in TCommand, TResult> : IRequestHandler<TCommand, TResult> where TCommand : IGrCommand<TResult>;
|
public interface IGrCommandHandler<in TCommand, TResult> : IRequestHandler<TCommand, TResult> where TCommand : IGrCommand<TResult>;
|
||||||
@ -1,13 +1,13 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Api.Extensions;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Extensions;
|
using Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Commands;
|
namespace Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
|
|
||||||
public class RegisterCommandHandler(ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<RegisterCommand, Result<SubjectEntity>>
|
public class RegisterCommandHandler(ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<RegisterCommand, Result<SubjectEntity>>
|
||||||
{
|
{
|
||||||
@ -2,14 +2,14 @@ using LanguageExt.Common;
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Api.Extensions;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
using Suspectus.GandalfReborn.Extensions;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
using Suspectus.GandalfReborn.Handlers.Commands;
|
using Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Security;
|
namespace Suspectus.Gandalf.Api.Handlers.Security;
|
||||||
|
|
||||||
public class AuthCodeRequestCommandHandler(IPasswordHasher<object> passwordHasher, ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<AuthCodeRequestCommand, Result<AuthCodeDto>>
|
public class AuthCodeRequestCommandHandler(IPasswordHasher<object> passwordHasher, ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<AuthCodeRequestCommand, Result<AuthCodeDto>>
|
||||||
{
|
{
|
||||||
@ -1,13 +1,13 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
using Suspectus.GandalfReborn.Handlers.Commands;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Security;
|
namespace Suspectus.Gandalf.Api.Handlers.Security;
|
||||||
|
|
||||||
public class CreateAuthCodeCommandHandler(IPasswordHasher<object> passwordHasher, TimeProvider timeProvider, IAuthCodeRepository authCodeRepository, IMapper mapper) : IGrCommandHandler<CreateAuthCodeCommand, Result<AuthCodeDto>>
|
public class CreateAuthCodeCommandHandler(IPasswordHasher<object> passwordHasher, TimeProvider timeProvider, IAuthCodeRepository authCodeRepository, IMapper mapper) : IGrCommandHandler<CreateAuthCodeCommand, Result<AuthCodeDto>>
|
||||||
{
|
{
|
||||||
@ -3,15 +3,15 @@ using JWT.Algorithms;
|
|||||||
using JWT.Builder;
|
using JWT.Builder;
|
||||||
using JWT.Serializers;
|
using JWT.Serializers;
|
||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Api.Extensions;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
using Suspectus.GandalfReborn.Extensions;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
using Suspectus.GandalfReborn.Handlers.Commands;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
using Suspectus.GandalfReborn.Security.Scheme;
|
using Suspectus.Gandalf.Security.Scheme;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Security;
|
namespace Suspectus.Gandalf.Api.Handlers.Security;
|
||||||
|
|
||||||
public class CreateTokensCommandHandler(TimeProvider timeProvider, IConfiguration configuration, IHashids hashids, ITokenMetadataRepository tokenMetadataRepository) : IGrCommandHandler<CreateTokensCommand, Result<TokenDto>>
|
public class CreateTokensCommandHandler(TimeProvider timeProvider, IConfiguration configuration, IHashids hashids, ITokenMetadataRepository tokenMetadataRepository) : IGrCommandHandler<CreateTokensCommand, Result<TokenDto>>
|
||||||
{
|
{
|
||||||
@ -3,13 +3,13 @@ using System.Text;
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Api.Extensions;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
using Suspectus.GandalfReborn.Extensions;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
using Suspectus.GandalfReborn.Handlers.Commands;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Security;
|
namespace Suspectus.Gandalf.Api.Handlers.Security;
|
||||||
|
|
||||||
public class GetTokensCommandHandler(IAuthCodeRepository authCodeRepository, TimeProvider timeProvider, IMediator mediator) : IGrCommandHandler<GetTokensCommand, Result<TokenDto>>
|
public class GetTokensCommandHandler(IAuthCodeRepository authCodeRepository, TimeProvider timeProvider, IMediator mediator) : IGrCommandHandler<GetTokensCommand, Result<TokenDto>>
|
||||||
{
|
{
|
||||||
@ -1,10 +1,10 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Suspectus.GandalfReborn.Commands;
|
using Suspectus.Gandalf.Api.Commands;
|
||||||
using Suspectus.GandalfReborn.Extensions;
|
using Suspectus.Gandalf.Api.Extensions;
|
||||||
using Suspectus.GandalfReborn.Handlers.Commands;
|
using Suspectus.Gandalf.Api.Handlers.Commands;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Handlers.Security;
|
namespace Suspectus.Gandalf.Api.Handlers.Security;
|
||||||
|
|
||||||
public class PasswordHashingHandler(IPasswordHasher<object> passwordHasher) : IGrCommandHandler<HashPasswordCommand, Result<string>>
|
public class PasswordHashingHandler(IPasswordHasher<object> passwordHasher) : IGrCommandHandler<HashPasswordCommand, Result<string>>
|
||||||
{
|
{
|
||||||
@ -3,10 +3,10 @@ using System.Text.Json.Serialization;
|
|||||||
using HashidsNet;
|
using HashidsNet;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Security.Scheme;
|
||||||
using Suspectus.GandalfReborn.Data.Database.Repositories;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
using Suspectus.GandalfReborn.Security.Scheme;
|
using Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ builder.Services.AddEndpointsApiExplorer();
|
|||||||
builder.Services.AddDbContext<ApplicationContext>(cfg => cfg
|
builder.Services.AddDbContext<ApplicationContext>(cfg => cfg
|
||||||
.UseNpgsql(
|
.UseNpgsql(
|
||||||
builder.Configuration.GetConnectionString("DefaultConnection"),
|
builder.Configuration.GetConnectionString("DefaultConnection"),
|
||||||
x => x.MigrationsAssembly("Suspectus.GandalfReborn.Data")
|
x => x.MigrationsAssembly("Suspectus.Gandalf.Data")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>Suspectus.GandalfReborn</RootNamespace>
|
<RootNamespace>Suspectus.Gandalf.Api</RootNamespace>
|
||||||
<LangVersion>12</LangVersion>
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@ -23,8 +23,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Suspectus.GandalfReborn.Data\Suspectus.GandalfReborn.Data.csproj" />
|
<ProjectReference Include="..\Suspectus.Gandalf.Data\Suspectus.Gandalf.Data.csproj" />
|
||||||
<ProjectReference Include="..\Suspectus.GandalfReborn.Security\Suspectus.GandalfReborn.Security.csproj" />
|
<ProjectReference Include="..\Suspectus.Gandalf.Security\Suspectus.Gandalf.Security.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -2,14 +2,14 @@ using HashidsNet;
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
using Suspectus.GandalfReborn.Security;
|
using Suspectus.Gandalf.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn;
|
namespace Suspectus.Gandalf.Api;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database;
|
namespace Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
public sealed class ApplicationContext(DbContextOptions<ApplicationContext> options, InvokerContext invokerContext) : CoreContext<ApplicationContext>(options)
|
public sealed class ApplicationContext(DbContextOptions<ApplicationContext> options, InvokerContext invokerContext) : CoreContext<ApplicationContext>(options)
|
||||||
{
|
{
|
||||||
@ -1,12 +1,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.App;
|
using Suspectus.Gandalf.Data.Entities.App;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
using Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database;
|
namespace Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
public abstract class CoreContext<T>(DbContextOptions<T> options) : DbContext(options) where T : DbContext
|
public abstract class CoreContext<T>(DbContextOptions<T> options) : DbContext(options) where T : DbContext
|
||||||
{
|
{
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.Common;
|
using System.Data.Common;
|
||||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database;
|
namespace Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
public class GrDbConnectionInterceptor(InvokerContext invokerContext) : IDbConnectionInterceptor
|
public class GrDbConnectionInterceptor(InvokerContext invokerContext) : IDbConnectionInterceptor
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
|
namespace Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
public class AuthCodeRepository(ApplicationContext context) : GrRepository<AuthCodeEntity>(context), IAuthCodeRepository;
|
public class AuthCodeRepository(ApplicationContext context) : GrRepository<AuthCodeEntity>(context), IAuthCodeRepository;
|
||||||
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
|
namespace Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
public abstract class GrRepository<TEntity>(ApplicationContext context) : IGrRepository<TEntity> where TEntity : class, IEntity
|
public abstract class GrRepository<TEntity>(ApplicationContext context) : IGrRepository<TEntity> where TEntity : class, IEntity
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using LanguageExt.Common;
|
using LanguageExt.Common;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
|
namespace Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
public interface IGrRepository<TEntity> where TEntity : class, IEntity
|
public interface IGrRepository<TEntity> where TEntity : class, IEntity
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
|
namespace Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
public class SubjectRepository(ApplicationContext context) : GrRepository<SubjectEntity>(context), ISubjectRepository;
|
public class SubjectRepository(ApplicationContext context) : GrRepository<SubjectEntity>(context), ISubjectRepository;
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
|
namespace Suspectus.Gandalf.Data.Database.Repositories;
|
||||||
|
|
||||||
public class TokenMetadataRepository(ApplicationContext context) : GrRepository<TokenMetadataEntity>(context), ITokenMetadataRepository;
|
public class TokenMetadataRepository(ApplicationContext context) : GrRepository<TokenMetadataEntity>(context), ITokenMetadataRepository;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Dto;
|
namespace Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
public class AuthCodeDto
|
public class AuthCodeDto
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Dto;
|
namespace Suspectus.Gandalf.Data.Dto;
|
||||||
|
|
||||||
public class TokenDto
|
public class TokenDto
|
||||||
{
|
{
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.App;
|
namespace Suspectus.Gandalf.Data.Entities.App;
|
||||||
|
|
||||||
public class AppRelationEntity : AppRelationData, IVersionableEntity
|
public class AppRelationEntity : AppRelationData, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,10 +1,10 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.App;
|
namespace Suspectus.Gandalf.Data.Entities.App;
|
||||||
|
|
||||||
public class AppSubjectRelationEntity : AppSubjectRelationData<long>, IMappingEntity, IVersionableEntity
|
public class AppSubjectRelationEntity : AppSubjectRelationData<long>, IMappingEntity, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public enum EntityVisibility
|
public enum EntityVisibility
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public interface IEntity
|
public interface IEntity
|
||||||
{
|
{
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
|
public interface IMappingEntity;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public abstract class IdData : IEntity
|
public abstract class IdData : IEntity
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public abstract class SubjectData : VisibilityData
|
public abstract class SubjectData : VisibilityData
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public abstract class TenantRelationData : VisibilityData
|
public abstract class TenantRelationData : VisibilityData
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
namespace Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
public abstract class VisibilityData : IdData
|
public abstract class VisibilityData : IdData
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities;
|
namespace Suspectus.Gandalf.Data.Entities;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Property)]
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
public class ContentKeyAttribute : Attribute
|
public class ContentKeyAttribute : Attribute
|
||||||
@ -1,10 +1,10 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.App;
|
using Suspectus.Gandalf.Data.Entities.App;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
public class AppSubjectRelationInternalAuthorityRelationEntity : AppSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
|
public class AppSubjectRelationInternalAuthorityRelationEntity : AppSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
public class AuthCodeEntity : IdData
|
public class AuthCodeEntity : IdData
|
||||||
{
|
{
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.App;
|
using Suspectus.Gandalf.Data.Entities.App;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
public class AuthorityEntity : IdData
|
public class AuthorityEntity : IdData
|
||||||
{
|
{
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
|
public enum AuthorityType
|
||||||
|
{
|
||||||
|
Tenant,
|
||||||
|
App
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
public class TenantSubjectRelationInternalAuthorityRelationEntity : TenantSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
|
public class TenantSubjectRelationInternalAuthorityRelationEntity : TenantSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
public class TokenMetadataEntity : IdData
|
public class TokenMetadataEntity : IdData
|
||||||
{
|
{
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
namespace Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
|
public enum TokenType
|
||||||
|
{
|
||||||
|
Application,
|
||||||
|
User
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
namespace Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
|
|
||||||
public class SignInEntity : SubjectData
|
public class SignInEntity : SubjectData
|
||||||
{
|
{
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
namespace Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
|
|
||||||
|
public enum SignInMethod
|
||||||
|
{
|
||||||
|
Simple,
|
||||||
|
Google,
|
||||||
|
Steam
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.App;
|
using Suspectus.Gandalf.Data.Entities.App;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
using Suspectus.Gandalf.Data.Entities.Subject.SignIn;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Subject;
|
namespace Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
|
|
||||||
public class SubjectEntity : VisibilityData
|
public class SubjectEntity : VisibilityData
|
||||||
{
|
{
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
|
|
||||||
|
namespace Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
|
public abstract class OwnerData : VisibilityData
|
||||||
|
{
|
||||||
|
public required long OwnerId { get; set; }
|
||||||
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.App;
|
using Suspectus.Gandalf.Data.Entities.App;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
|
namespace Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
public class TenantEntity : TenantData, IVersionableEntity
|
public class TenantEntity : TenantData, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Version;
|
using Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
|
namespace Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
public class TenantSubjectRelationEntity : TenantSubjectRelationData<long>, IMappingEntity, IVersionableEntity
|
public class TenantSubjectRelationEntity : TenantSubjectRelationData<long>, IMappingEntity, IVersionableEntity
|
||||||
{
|
{
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
using Suspectus.Gandalf.Data.Entities.Base;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Subject;
|
using Suspectus.Gandalf.Data.Entities.Subject;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Tenant;
|
using Suspectus.Gandalf.Data.Entities.Tenant;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Version;
|
namespace Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
public interface IVersionableBase : IEntity, IVersionableEntity;
|
public interface IVersionableBase : IEntity, IVersionableEntity;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Version;
|
namespace Suspectus.Gandalf.Data.Entities.Version;
|
||||||
|
|
||||||
public enum VersionAction
|
public enum VersionAction
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Extensions;
|
namespace Suspectus.Gandalf.Data.Extensions;
|
||||||
|
|
||||||
public static class StringExtensions
|
public static class StringExtensions
|
||||||
{
|
{
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Suspectus.GandalfReborn.Data.Dto;
|
using Suspectus.Gandalf.Data.Dto;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Mapper;
|
namespace Suspectus.Gandalf.Data.Mapper;
|
||||||
|
|
||||||
public class AuthCodeDtoMappingProfile : Profile
|
public class AuthCodeDtoMappingProfile : Profile
|
||||||
{
|
{
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<RootNamespace>Suspectus.GandalfReborn.Data</RootNamespace>
|
<RootNamespace>Suspectus.Gandalf.Data</RootNamespace>
|
||||||
<LangVersion>12</LangVersion>
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Suspectus.GandalfReborn.Abstractions\Suspectus.GandalfReborn.Abstractions.csproj" />
|
<ProjectReference Include="..\Suspectus.Gandalf.Abstractions\Suspectus.Gandalf.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -2,10 +2,10 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
using Suspectus.GandalfReborn.Data.Entities.Security;
|
using Suspectus.Gandalf.Data.Entities.Security;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Security;
|
namespace Suspectus.Gandalf.Security;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
|
||||||
public class GrAuthorizeAttribute : Attribute, IAuthorizationFilter
|
public class GrAuthorizeAttribute : Attribute, IAuthorizationFilter
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Security.Scheme;
|
namespace Suspectus.Gandalf.Security.Scheme;
|
||||||
|
|
||||||
public static class GandalfRebornJwtTokenAuthExtensions
|
public static class GandalfRebornJwtTokenAuthExtensions
|
||||||
{
|
{
|
||||||
@ -15,10 +15,10 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Suspectus.GandalfReborn.Abstractions;
|
using Suspectus.Gandalf.Abstractions;
|
||||||
using Suspectus.GandalfReborn.Data.Database;
|
using Suspectus.Gandalf.Data.Database;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Security.Scheme;
|
namespace Suspectus.Gandalf.Security.Scheme;
|
||||||
|
|
||||||
public class GandalfRebornJwtBody
|
public class GandalfRebornJwtBody
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Security.Scheme;
|
namespace Suspectus.Gandalf.Security.Scheme;
|
||||||
|
|
||||||
public class GandalfRebornJwtTokenAuthSchemeOptions : AuthenticationSchemeOptions
|
public class GandalfRebornJwtTokenAuthSchemeOptions : AuthenticationSchemeOptions
|
||||||
{
|
{
|
||||||
@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<RootNamespace>Suspectus.GandalfReborn.Security</RootNamespace>
|
<RootNamespace>Suspectus.Gandalf.Security</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -14,8 +14,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Suspectus.GandalfReborn.Abstractions\Suspectus.GandalfReborn.Abstractions.csproj" />
|
<ProjectReference Include="..\Suspectus.Gandalf.Abstractions\Suspectus.Gandalf.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\Suspectus.GandalfReborn.Data\Suspectus.GandalfReborn.Data.csproj" />
|
<ProjectReference Include="..\Suspectus.Gandalf.Data\Suspectus.Gandalf.Data.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -1,3 +0,0 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Base;
|
|
||||||
|
|
||||||
public interface IMappingEntity;
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
|
||||||
|
|
||||||
public enum AuthorityType
|
|
||||||
{
|
|
||||||
Tenant,
|
|
||||||
App
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Security;
|
|
||||||
|
|
||||||
public enum TokenType
|
|
||||||
{
|
|
||||||
Application,
|
|
||||||
User
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
namespace Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
|
|
||||||
|
|
||||||
public enum SignInMethod
|
|
||||||
{
|
|
||||||
Simple,
|
|
||||||
Google,
|
|
||||||
Steam
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
using Suspectus.GandalfReborn.Data.Entities.Base;
|
|
||||||
|
|
||||||
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
|
|
||||||
|
|
||||||
public abstract class OwnerData : VisibilityData
|
|
||||||
{
|
|
||||||
public required long OwnerId { get; set; }
|
|
||||||
}
|
|
||||||
@ -1,12 +1,16 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.GandalfReborn.Api", "Suspectus.GandalfReborn.Api\Suspectus.GandalfReborn.Api.csproj", "{067494CB-FE63-42F0-A154-586E50442969}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.Gandalf.Api", "Suspectus.Gandalf.Api\Suspectus.Gandalf.Api.csproj", "{067494CB-FE63-42F0-A154-586E50442969}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.GandalfReborn.Data", "Suspectus.GandalfReborn.Data\Suspectus.GandalfReborn.Data.csproj", "{B4AF6985-3268-4C2E-9C50-D92DA7D3711D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.Gandalf.Data", "Suspectus.Gandalf.Data\Suspectus.Gandalf.Data.csproj", "{B4AF6985-3268-4C2E-9C50-D92DA7D3711D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.GandalfReborn.Security", "Suspectus.GandalfReborn.Security\Suspectus.GandalfReborn.Security.csproj", "{C8C3047B-ED0B-4516-A282-8B07E3EEB430}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.Gandalf.Security", "Suspectus.Gandalf.Security\Suspectus.Gandalf.Security.csproj", "{C8C3047B-ED0B-4516-A282-8B07E3EEB430}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.GandalfReborn.Abstractions", "Suspectus.GandalfReborn.Abstractions\Suspectus.GandalfReborn.Abstractions.csproj", "{44C283FD-2E01-496C-9E8F-4E43C26C9733}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.Gandalf.Abstractions", "Suspectus.Gandalf.Abstractions\Suspectus.Gandalf.Abstractions.csproj", "{44C283FD-2E01-496C-9E8F-4E43C26C9733}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mithrandir", "Mithrandir", "{D54D8A40-A5C3-4273-B4D7-F2B83056161B}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gandalf", "Gandalf", "{A82EA24B-1379-41B2-A363-CDCBF9F18833}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -31,4 +35,10 @@ Global
|
|||||||
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.Build.0 = Release|Any CPU
|
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{44C283FD-2E01-496C-9E8F-4E43C26C9733} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
|
||||||
|
{067494CB-FE63-42F0-A154-586E50442969} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
|
||||||
|
{B4AF6985-3268-4C2E-9C50-D92DA7D3711D} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
|
||||||
|
{C8C3047B-ED0B-4516-A282-8B07E3EEB430} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
Loading…
x
Reference in New Issue
Block a user