Compare commits

...

3 Commits

Author SHA1 Message Date
max
21675300bb [REMOVE] Remove old project data 2024-12-16 02:36:10 +01:00
max
e62bdfeeae Merge remote-tracking branch 'origin/main' 2024-12-16 02:34:51 +01:00
max
e8438c807d [REFACTOR] Reworking auth implementation 2024-12-16 02:34:30 +01:00
5 changed files with 51 additions and 13 deletions

View File

@ -10,10 +10,6 @@
<ProjectReference Include="..\DotBased\DotBased.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.6" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

View File

@ -22,9 +22,6 @@ public static class DotBasedAuthDependencyInjection
if (Configuration.AuthDataRepositoryType == null)
throw new ArgumentNullException(nameof(Configuration.AuthDataRepositoryType), $"No '{nameof(IAuthDataRepository)}' configured!");
services.AddScoped(typeof(IAuthDataRepository), Configuration.AuthDataRepositoryType);
/*if (Configuration.SessionStateProviderType == null)
throw new ArgumentNullException(nameof(Configuration.SessionStateProviderType), $"No '{nameof(ISessionStateProvider)}' configured!");
services.AddScoped(typeof(ISessionStateProvider), Configuration.SessionStateProviderType);*/
services.AddSingleton<AuthDataCache>();
services.AddScoped<SecurityService>();

View File

@ -0,0 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
namespace DotBased.AspNet.Auth;
public static class BasedAuthExtensions
{
public static IServiceCollection AddBasedAuthentication(this IServiceCollection services)
{
return services;
}
}

View File

@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
<Folder Include="Repositories\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotBased\DotBased.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Authentication">
<HintPath>..\..\..\..\..\usr\lib64\dotnet\shared\Microsoft.AspNetCore.App\8.0.11\Microsoft.AspNetCore.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions">
<HintPath>..\..\..\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\8.0.2\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
</ItemGroup>
</Project>

View File

@ -18,7 +18,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWebApi", "TestWebApi\Te
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Wasm", "Blazor.Wasm\Blazor.Wasm.csproj", "{AC8343A5-7953-4E1D-A926-406BE4D7E819}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotBased.ASP.Authentication", "DotBased.ASP.Authentication\DotBased.ASP.Authentication.csproj", "{624BFC98-4534-4BC0-B92A-65A5F516241D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNet", "AspNet", "{624E7B11-8A18-46E5-AB1F-6AF6097F9D4D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotBased.AspNet.Auth", "DotBased.AspNet.Auth\DotBased.AspNet.Auth.csproj", "{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -54,10 +56,10 @@ Global
{AC8343A5-7953-4E1D-A926-406BE4D7E819}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC8343A5-7953-4E1D-A926-406BE4D7E819}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC8343A5-7953-4E1D-A926-406BE4D7E819}.Release|Any CPU.Build.0 = Release|Any CPU
{624BFC98-4534-4BC0-B92A-65A5F516241D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{624BFC98-4534-4BC0-B92A-65A5F516241D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{624BFC98-4534-4BC0-B92A-65A5F516241D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{624BFC98-4534-4BC0-B92A-65A5F516241D}.Release|Any CPU.Build.0 = Release|Any CPU
{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EBBDAF9A-BFC7-4BDC-8C51-0501B59A1DDC} = {2156FB93-C252-4B33-8A0C-73C82FABB163}
@ -65,6 +67,7 @@ Global
{D4D9B584-A524-4CBB-9B61-9CD65ED4AF0D} = {2156FB93-C252-4B33-8A0C-73C82FABB163}
{BADA4BAF-142B-47A8-95FC-B25E1D3D0020} = {DBDB4538-85D4-45AC-9E0A-A684467AEABA}
{AC8343A5-7953-4E1D-A926-406BE4D7E819} = {DBDB4538-85D4-45AC-9E0A-A684467AEABA}
{624BFC98-4534-4BC0-B92A-65A5F516241D} = {2156FB93-C252-4B33-8A0C-73C82FABB163}
{624E7B11-8A18-46E5-AB1F-6AF6097F9D4D} = {2156FB93-C252-4B33-8A0C-73C82FABB163}
{6F407D81-DFAC-4936-ACDD-D75E9FDE2E7B} = {624E7B11-8A18-46E5-AB1F-6AF6097F9D4D}
EndGlobalSection
EndGlobal