diff --git a/IdentityServer/v7/Apis/ResourceBasedApi/Program.cs b/IdentityServer/v7/Apis/ResourceBasedApi/Program.cs
index 15c6bc03..eb8ac1c4 100755
--- a/IdentityServer/v7/Apis/ResourceBasedApi/Program.cs
+++ b/IdentityServer/v7/Apis/ResourceBasedApi/Program.cs
@@ -1,27 +1,15 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
-using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using ResourceBasedApi;
-using Serilog;
-using Serilog.Events;
-using Serilog.Sinks.SystemConsole.Themes;
-
-Console.Title = "Resource based API";
-Log.Logger = new LoggerConfiguration()
- .MinimumLevel.Verbose()
- .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
- .MinimumLevel.Override("System", LogEventLevel.Information)
- .MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
- .Enrich.FromLogContext()
- .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}", theme: AnsiConsoleTheme.Code)
- .CreateLogger();
var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddSerilog();
+builder.AddServiceDefaults();
+
builder.Services.AddControllers();
builder.Services.AddCors();
@@ -51,6 +39,8 @@
var app = builder.Build();
+app.MapDefaultEndpoints();
+
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
diff --git a/IdentityServer/v7/Apis/ResourceBasedApi/ResourceBasedApi.csproj b/IdentityServer/v7/Apis/ResourceBasedApi/ResourceBasedApi.csproj
index b7129bc3..4c11d81b 100755
--- a/IdentityServer/v7/Apis/ResourceBasedApi/ResourceBasedApi.csproj
+++ b/IdentityServer/v7/Apis/ResourceBasedApi/ResourceBasedApi.csproj
@@ -2,13 +2,16 @@
net10.0
+ enable
+
-
+
+
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs
new file mode 100644
index 00000000..38888efa
--- /dev/null
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs
@@ -0,0 +1,11 @@
+var builder = DistributedApplication.CreateBuilder(args);
+
+var idp = builder.AddProject("identityserverhost");
+
+builder.AddProject("simple-api")
+ .WaitFor(idp);
+
+builder.AddProject("client")
+ .WaitFor(idp);
+
+builder.Build().Run();
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj
new file mode 100644
index 00000000..9d1cdbb7
--- /dev/null
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json
new file mode 100644
index 00000000..2fd7abcd
--- /dev/null
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:17050;http://localhost:15293",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21177",
+ "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23178",
+ "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22126"
+ }
+ },
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:15293",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19222",
+ "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:18151",
+ "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20036"
+ }
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json
new file mode 100644
index 00000000..31c092aa
--- /dev/null
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.Dcp": "Warning"
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.sln b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.sln
index bdabce70..36bec5a2 100755
--- a/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.sln
+++ b/IdentityServer/v7/Basics/ClientCredentials/ClientCredentials.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\SimpleApi\SimpleApi.csproj", "{2538D8F8-8265-4C96-9888-DA03306C1CC2}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientCredentials.AppHost", "ClientCredentials.AppHost\ClientCredentials.AppHost.csproj", "{62431B35-40B5-43B9-B4B7-BF730DEAA56D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -18,9 +20,6 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -34,18 +33,6 @@ Global
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x64.Build.0 = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.ActiveCfg = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.Build.0 = Release|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -70,7 +57,20 @@ Global
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x64.Build.0 = Release|Any CPU
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x86.ActiveCfg = Release|Any CPU
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x86.Build.0 = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|x64.Build.0 = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Debug|x86.Build.0 = Debug|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|x64.ActiveCfg = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|x64.Build.0 = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|x86.ActiveCfg = Release|Any CPU
+ {62431B35-40B5-43B9-B4B7-BF730DEAA56D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/AppHost.cs b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/AppHost.cs
new file mode 100644
index 00000000..11b875d8
--- /dev/null
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/AppHost.cs
@@ -0,0 +1,11 @@
+var builder = DistributedApplication.CreateBuilder(args);
+
+var idp = builder.AddProject("identityserverhost");
+
+builder.AddProject("resource-based-api")
+ .WaitFor(idp);
+
+builder.AddProject("client")
+ .WaitFor(idp);
+
+builder.Build().Run();
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj
new file mode 100644
index 00000000..3230450b
--- /dev/null
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json
new file mode 100644
index 00000000..69a2a867
--- /dev/null
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:15235",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:21135",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22135"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:17235;http://localhost:15235",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21135",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22135"
+ }
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.development.json b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.development.json
new file mode 100644
index 00000000..c06aa74a
--- /dev/null
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.DistributedApplication": "Information"
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.json b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.json
new file mode 100644
index 00000000..c06aa74a
--- /dev/null
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.AppHost/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.DistributedApplication": "Information"
+ }
+ }
+}
diff --git a/IdentityServer/v7/Basics/Introspection/Introspection.sln b/IdentityServer/v7/Basics/Introspection/Introspection.sln
index c385d34f..2e561b87 100755
--- a/IdentityServer/v7/Basics/Introspection/Introspection.sln
+++ b/IdentityServer/v7/Basics/Introspection/Introspection.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceBasedApi", "..\..\Apis\ResourceBasedApi\ResourceBasedApi.csproj", "{47794C35-D331-44C8-B54C-A8EFC6D15147}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Introspection.AppHost", "Introspection.AppHost\Introspection.AppHost.csproj", "{66086001-58EF-499D-933C-0AB86778BB94}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -18,9 +20,6 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -34,18 +33,6 @@ Global
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x64.Build.0 = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.ActiveCfg = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.Build.0 = Release|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -70,7 +57,20 @@ Global
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x64.Build.0 = Release|Any CPU
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x86.ActiveCfg = Release|Any CPU
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x86.Build.0 = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|x64.Build.0 = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Debug|x86.Build.0 = Debug|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|x64.ActiveCfg = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|x64.Build.0 = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|x86.ActiveCfg = Release|Any CPU
+ {66086001-58EF-499D-933C-0AB86778BB94}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/IdentityServer/v8/Apis/ResourceBasedApi/Program.cs b/IdentityServer/v8/Apis/ResourceBasedApi/Program.cs
index 15c6bc03..eb8ac1c4 100755
--- a/IdentityServer/v8/Apis/ResourceBasedApi/Program.cs
+++ b/IdentityServer/v8/Apis/ResourceBasedApi/Program.cs
@@ -1,27 +1,15 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
-using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using ResourceBasedApi;
-using Serilog;
-using Serilog.Events;
-using Serilog.Sinks.SystemConsole.Themes;
-
-Console.Title = "Resource based API";
-Log.Logger = new LoggerConfiguration()
- .MinimumLevel.Verbose()
- .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
- .MinimumLevel.Override("System", LogEventLevel.Information)
- .MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
- .Enrich.FromLogContext()
- .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}", theme: AnsiConsoleTheme.Code)
- .CreateLogger();
var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddSerilog();
+builder.AddServiceDefaults();
+
builder.Services.AddControllers();
builder.Services.AddCors();
@@ -51,6 +39,8 @@
var app = builder.Build();
+app.MapDefaultEndpoints();
+
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
diff --git a/IdentityServer/v8/Apis/ResourceBasedApi/ResourceBasedApi.csproj b/IdentityServer/v8/Apis/ResourceBasedApi/ResourceBasedApi.csproj
index b7129bc3..4c11d81b 100755
--- a/IdentityServer/v8/Apis/ResourceBasedApi/ResourceBasedApi.csproj
+++ b/IdentityServer/v8/Apis/ResourceBasedApi/ResourceBasedApi.csproj
@@ -2,13 +2,16 @@
net10.0
+ enable
+
-
+
+
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs
new file mode 100644
index 00000000..38888efa
--- /dev/null
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/AppHost.cs
@@ -0,0 +1,11 @@
+var builder = DistributedApplication.CreateBuilder(args);
+
+var idp = builder.AddProject("identityserverhost");
+
+builder.AddProject("simple-api")
+ .WaitFor(idp);
+
+builder.AddProject("client")
+ .WaitFor(idp);
+
+builder.Build().Run();
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj
new file mode 100644
index 00000000..9d1cdbb7
--- /dev/null
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/ClientCredentials.AppHost.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json
new file mode 100644
index 00000000..415172a6
--- /dev/null
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:17049;http://localhost:15292",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21176",
+ "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23177",
+ "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22125"
+ }
+ },
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:15292",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_ENVIRONMENT": "Development",
+ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19221",
+ "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:18150",
+ "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20035"
+ }
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json
new file mode 100644
index 00000000..31c092aa
--- /dev/null
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.AppHost/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.Dcp": "Warning"
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.sln b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.sln
index bdabce70..60f4e689 100755
--- a/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.sln
+++ b/IdentityServer/v8/Basics/ClientCredentials/ClientCredentials.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\SimpleApi\SimpleApi.csproj", "{2538D8F8-8265-4C96-9888-DA03306C1CC2}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientCredentials.AppHost", "ClientCredentials.AppHost\ClientCredentials.AppHost.csproj", "{657AD2D8-C614-47A4-AF17-F611782E9692}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -18,9 +20,6 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -34,18 +33,6 @@ Global
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x64.Build.0 = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.ActiveCfg = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.Build.0 = Release|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62EB4A12-0868-4770-A63C-14FA07F0BF5C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -70,7 +57,20 @@ Global
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x64.Build.0 = Release|Any CPU
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x86.ActiveCfg = Release|Any CPU
{2538D8F8-8265-4C96-9888-DA03306C1CC2}.Release|x86.Build.0 = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|x64.Build.0 = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Debug|x86.Build.0 = Debug|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|Any CPU.Build.0 = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|x64.ActiveCfg = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|x64.Build.0 = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|x86.ActiveCfg = Release|Any CPU
+ {657AD2D8-C614-47A4-AF17-F611782E9692}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/AppHost.cs b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/AppHost.cs
new file mode 100644
index 00000000..11b875d8
--- /dev/null
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/AppHost.cs
@@ -0,0 +1,11 @@
+var builder = DistributedApplication.CreateBuilder(args);
+
+var idp = builder.AddProject("identityserverhost");
+
+builder.AddProject("resource-based-api")
+ .WaitFor(idp);
+
+builder.AddProject("client")
+ .WaitFor(idp);
+
+builder.Build().Run();
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj
new file mode 100644
index 00000000..3230450b
--- /dev/null
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Introspection.AppHost.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json
new file mode 100644
index 00000000..f727bf4f
--- /dev/null
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:15234",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:21134",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22134"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:17234;http://localhost:15234",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21134",
+ "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22134"
+ }
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.development.json b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.development.json
new file mode 100644
index 00000000..c06aa74a
--- /dev/null
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.DistributedApplication": "Information"
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.json b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.json
new file mode 100644
index 00000000..c06aa74a
--- /dev/null
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.AppHost/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning",
+ "Aspire.Hosting.DistributedApplication": "Information"
+ }
+ }
+}
diff --git a/IdentityServer/v8/Basics/Introspection/Introspection.sln b/IdentityServer/v8/Basics/Introspection/Introspection.sln
index c385d34f..42de8252 100755
--- a/IdentityServer/v8/Basics/Introspection/Introspection.sln
+++ b/IdentityServer/v8/Basics/Introspection/Introspection.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceBasedApi", "..\..\Apis\ResourceBasedApi\ResourceBasedApi.csproj", "{47794C35-D331-44C8-B54C-A8EFC6D15147}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Introspection.AppHost", "Introspection.AppHost\Introspection.AppHost.csproj", "{B0CC862F-6EDD-4C83-9E69-4B3826074B71}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -18,9 +20,6 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -34,18 +33,6 @@ Global
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x64.Build.0 = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.ActiveCfg = Release|Any CPU
{231602F3-72FC-4D10-9BB8-90FCCF662DF6}.Release|x86.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x64.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Debug|x86.Build.0 = Debug|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|Any CPU.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x64.Build.0 = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.ActiveCfg = Release|Any CPU
- {1F49E1C3-B9BC-42EC-881E-AF42D358EAF5}.Release|x86.Build.0 = Release|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6257F3CF-8198-4861-9080-8C9FA8230BD5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -70,7 +57,20 @@ Global
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x64.Build.0 = Release|Any CPU
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x86.ActiveCfg = Release|Any CPU
{47794C35-D331-44C8-B54C-A8EFC6D15147}.Release|x86.Build.0 = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|x64.Build.0 = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Debug|x86.Build.0 = Debug|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|x64.ActiveCfg = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|x64.Build.0 = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|x86.ActiveCfg = Release|Any CPU
+ {B0CC862F-6EDD-4C83-9E69-4B3826074B71}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/samples.slnx b/samples.slnx
index 07e3c41b..daaf8585 100644
--- a/samples.slnx
+++ b/samples.slnx
@@ -202,6 +202,7 @@
+
@@ -423,6 +424,7 @@
+