mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-01-18 10:04:20 +01:00
Deleted authentication package (later implementation)
This commit is contained in:
parent
4580c5f5dc
commit
1b080ae5c7
|
@ -1,16 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication;
|
||||
|
||||
public class BasedAuthenticationBuilder
|
||||
{
|
||||
public BasedAuthenticationBuilder(Type authRepository)
|
||||
{
|
||||
if (authRepository.IsValueType)
|
||||
{
|
||||
throw new ArgumentException("Type cannot be a value type!", nameof(authRepository));
|
||||
}
|
||||
|
||||
AuthenticationRepositoryType = authRepository;
|
||||
}
|
||||
|
||||
public Type AuthenticationRepositoryType { get; }
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
using DotBased.ASP.Authentication.Configuration;
|
||||
using DotBased.ASP.Authentication.Repositories;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DotBased.ASP.Authentication;
|
||||
|
||||
public static class BasedAuthenticationExtensions
|
||||
{
|
||||
public static BasedAuthenticationBuilder AddBasedAuthentication(this IServiceCollection services, Action<AuthenticationConfiguration>? configurationAction)
|
||||
{
|
||||
/*
|
||||
* Add services
|
||||
* - Validators
|
||||
* - Managers
|
||||
* - Services
|
||||
*/
|
||||
if (configurationAction != null)
|
||||
{
|
||||
services.Configure(configurationAction);
|
||||
}
|
||||
|
||||
return new BasedAuthenticationBuilder(typeof(BasedAuthenticationBuilder));
|
||||
}
|
||||
|
||||
public static BasedAuthenticationBuilder AddRepository<TRepository>(this BasedAuthenticationBuilder builder)
|
||||
{
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BasedAuthenticationBuilder SeedData<TRepository>(this BasedAuthenticationBuilder builder, Action<TRepository> seeder) where TRepository : RepositoryBase
|
||||
{
|
||||
return builder;
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
|
||||
namespace DotBased.ASP.Authentication;
|
||||
|
||||
public class BasedAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Configuration;
|
||||
|
||||
public class AuthenticationConfiguration
|
||||
{
|
||||
public CacheConfiguration Cache { get; set; } = new();
|
||||
public LockoutConfiguration Lockout { get; set; } = new();
|
||||
public PasswordConfiguration Password { get; set; } = new();
|
||||
public UserConfiguration User { get; set; } = new();
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Configuration;
|
||||
|
||||
public class CacheConfiguration
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Configuration;
|
||||
|
||||
public class LockoutConfiguration
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Configuration;
|
||||
|
||||
public class PasswordConfiguration
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Configuration;
|
||||
|
||||
public class UserConfiguration
|
||||
{
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DotBased\DotBased.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Providers;
|
||||
|
||||
public interface IStateProvider
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface IAttributeRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface IAuthenticationRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface IGroupRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface IRoleRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface ISessionRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public interface IUserRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
namespace DotBased.ASP.Authentication.Repositories;
|
||||
|
||||
public abstract class RepositoryBase : IAuthenticationRepository, IAttributeRepository, IGroupRepository, ISessionRepository, IUserRepository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
using DotBased.ASP.Authentication.Configuration;
|
||||
using DotBased.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DotBased.ASP.Authentication;
|
||||
|
||||
public class SecurityManager
|
||||
{
|
||||
public SecurityManager(IServiceProvider services, IOptions<AuthenticationConfiguration>? config)
|
||||
{
|
||||
_services = services;
|
||||
Configuration = config?.Value ?? new AuthenticationConfiguration();
|
||||
}
|
||||
private ILogger _logger = LogService.RegisterLogger<SecurityManager>();
|
||||
private IServiceProvider _services;
|
||||
public AuthenticationConfiguration Configuration { get; set; }
|
||||
}
|
Loading…
Reference in New Issue
Block a user