Compare commits

..
1 Commits
Author SHA1 Message Date
saherelm df3ed7868b last ... 2026-11-08 17:59:00 +03:30
3 changed files with 446 additions and 405 deletions
+10 -1
View File
@@ -6,6 +6,7 @@ using xIds.Providers;
using Newtonsoft.Json;
using xIds.Interfaces;
using System.Reflection;
using xLoggingService.DI;
using xStorageService.DI;
using xCommons.Extensions;
using xCommons.Configurations;
@@ -29,6 +30,7 @@ namespace xIds
public void ConfigureServices(IServiceCollection services)
{
services.AddXLoggingService(Configuration);
//
// Register Validation Provider and all XCommons Module Services ...
services.AddXCommons(Configuration);
@@ -78,7 +80,11 @@ namespace xIds
services.AddSingleton<IXSecurityProvider, XSecurityProvider>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger<Startup> logger)
public void Configure(
IApplicationBuilder app,
IWebHostEnvironment env,
ILogger<Startup> logger
)
{
//
if (env.IsDevelopment())
@@ -125,3 +131,6 @@ namespace xIds
}
}
}
+43 -2
View File
@@ -250,7 +250,9 @@
}
],
"Enabled": true,
"RedirectUris": ["https://localhost:5001/signin-oidc"],
"RedirectUris": [
"https://localhost:5001/signin-oidc"
],
"AllowedGrantTypes": [
"hybrid",
"password",
@@ -285,7 +287,12 @@
"DeviceCodeLifetime": 300
}
],
"IdentityResources": ["openid", "profile", "email", "role"],
"IdentityResources": [
"openid",
"profile",
"email",
"role"
],
"ApiResources": [
{
"Name": "IdentityServerApi"
@@ -391,6 +398,40 @@
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"XLogger": {
"Enabled": true,
"ApplicationName": "xIds",
"EnvironmentName": "Production",
"MinimumLevel": "Information",
"Queue": {
"Enabled": true,
"Capacity": 10000,
"ShutdownTimeoutSeconds": 10
},
"File": {
"Enabled": true,
"Directory": "./Logs",
"FileName": "xIds-.log",
"Format": "Json",
"MinimumLevel": "Information",
"RetainedFileCountLimit": 30
},
"Database": {
"Enabled": false,
"Provider": "Microsoft.Data.Sqlite",
"ConnectionString": "Filename=./Db/XLogs.db",
"TableName": "XLogs",
"AutoCreateTable": true,
"MinimumLevel": "Warning"
},
"Event": {
"Enabled": false,
"Topic": "application-logs",
"Action": "ApplicationLogCreated",
"Sender": "xIds",
"MinimumLevel": "Error"
}
}
},
"AllowedHosts": "*"
+5 -14
View File
@@ -7,32 +7,25 @@
<PackageId>xSaherElm.xIds</PackageId>
<Company>SaherElm IT Center</Company>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Description>
this project is an Identity Server for xSaherElm projects which provides Authentication and
Authorization of User's.
</Description>
<!-- Icon Definition -->
<PackageIcon>icon.png</PackageIcon>
<!-- Fix Duplicate TargetFramework Issue -->
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<!-- Icon Handling -->
<ItemGroup>
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true"
PackagePath="\icon.png" />
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
</ItemGroup>
<!-- Local Dependencies -->
<ItemGroup>
<!-- <PackageReference Include="xDashboard.xMessageService" Version="1.0.0" />
<PackageReference Include="xDashboard.xStorageService" Version="1.0.0" /> -->
</ItemGroup>
<!-- Project Dependencies -->
<ItemGroup>
<ProjectReference Include="..\Modules\xIdentityHelper\xIdentityHelper.csproj" />
@@ -40,7 +33,6 @@
<ProjectReference Include="..\Modules\xStorageService\xStorageService.csproj" />
<ProjectReference Include="..\Modules\xIdentityService\xIdentityService.csproj" />
</ItemGroup>
<!-- IdentityServer -->
<ItemGroup>
<PackageReference Include="IdentityServer4" Version="4.1.1" />
@@ -53,10 +45,8 @@
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.12" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.2" />
<PackageReference Include="IdentityModel.AspNetCore.AccessTokenValidation"
Version="1.0.0-preview.3" />
<PackageReference Include="IdentityModel.AspNetCore.AccessTokenValidation" Version="1.0.0-preview.3" />
</ItemGroup>
<!-- Ef Core -->
<ItemGroup>
<PackageReference Include="MySql.EntityFrameworkCore" Version="5.0.0" />
@@ -72,16 +62,17 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<!-- For XML Documentation Support -->
<PropertyGroup>
<NoWarn>$(NoWarn);1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<!-- Create Required Folders -->
<Target Name="CreateRequiredFolder" AfterTargets="AfterPublish">
<MakeDir Directories="$(PublishDir)wwwroot" Condition="!Exists('$(PublishDir)wwwroot')" />
</Target>
<ItemGroup>
<ProjectReference Include="..\Modules\xLoggingService\xLoggingService.csproj" />
</ItemGroup>
</Project>