Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var builder = DistributedApplication.CreateBuilder(args);

var idp = builder.AddProject<Projects.IdentityServerHost>("identityserverhost");

builder.AddProject<Projects.SimpleApi>("simple-api")
.WaitFor(idp);

builder.AddProject<Projects.Client>("client")
.WaitFor(idp);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Aspire.AppHost.Sdk/13.2.2">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\IdentityServerHost\src\IdentityServerHost.csproj" />
<ProjectReference Include="..\src\Client.csproj" />
<ProjectReference Include="..\..\..\Apis\SimpleApi\SimpleApi.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15236",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:21136",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22136"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17236;http://localhost:15236",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21136",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22136"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.DistributedApplication": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.DistributedApplication": "Information"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\Sim
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..\IdentityServerHost\src\IdentityServerHost.csproj", "{131A8C1E-C9F0-46FA-9B44-C234E2173429}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcBackChannelLogout.AppHost", "MvcBackChannelLogout.AppHost\MvcBackChannelLogout.AppHost.csproj", "{D91E7A1F-6907-4441-ADBD-21F5130699D8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -18,22 +22,7 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -70,7 +59,20 @@ Global
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x64.Build.0 = Release|Any CPU
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x86.ActiveCfg = Release|Any CPU
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x86.Build.0 = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|x64.ActiveCfg = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|x64.Build.0 = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|x86.ActiveCfg = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Debug|x86.Build.0 = Debug|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|Any CPU.Build.0 = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|x64.ActiveCfg = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|x64.Build.0 = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|x86.ActiveCfg = Release|Any CPU
{D91E7A1F-6907-4441-ADBD-21F5130699D8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Aspire.ServiceDefaults\Aspire.ServiceDefaults.csproj" />
</ItemGroup>

<!-- Constants and helpers -->
<ItemGroup>
<Compile Include="..\..\Shared\Constants.cs">
Expand Down
5 changes: 5 additions & 0 deletions IdentityServer/v7/Basics/MvcBackChannelLogout/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

builder.Services.AddControllersWithViews();
builder.Services.AddHttpClient();

Expand Down Expand Up @@ -62,6 +65,8 @@

var app = builder.Build();

app.MapDefaultEndpoints();

app.UseDeveloperExceptionPage();
app.UseStaticFiles();

Expand Down
1 change: 0 additions & 1 deletion IdentityServer/v7/Basics/MvcPar/src/Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<PackageReference Include="Duende.AccessTokenManagement.OpenIdConnect" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>

<!-- Constants and helpers -->
Expand Down
8 changes: 0 additions & 8 deletions IdentityServer/v7/Basics/MvcPar/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,11 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using Serilog;

Console.Title = "MvcPar";

Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.Enrich.FromLogContext()
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}")
.CreateLogger();

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSerilog();
builder.Services.AddTransient<ParOidcEvents>();
builder.Services.AddSingleton<IDiscoveryCache>(_ => new DiscoveryCache(Urls.IdentityServer));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var builder = DistributedApplication.CreateBuilder(args);

var idp = builder.AddProject<Projects.IdentityServerHost>("identityserverhost");

builder.AddProject<Projects.SimpleApi>("simple-api")
.WaitFor(idp);

builder.AddProject<Projects.Client>("client")
.WaitFor(idp);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Aspire.AppHost.Sdk/13.2.2">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\IdentityServerHost\src\IdentityServerHost.csproj" />
<ProjectReference Include="..\src\Client.csproj" />
<ProjectReference Include="..\..\..\Apis\SimpleApi\SimpleApi.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.DistributedApplication": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.DistributedApplication": "Information"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\Sim
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..\IdentityServerHost\src\IdentityServerHost.csproj", "{131A8C1E-C9F0-46FA-9B44-C234E2173429}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcBackChannelLogout.AppHost", "MvcBackChannelLogout.AppHost\MvcBackChannelLogout.AppHost.csproj", "{282D6679-D2C7-4259-9734-7C911D391B21}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -18,22 +22,7 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62493CA0-0872-4C10-AE75-1D2590B027EF}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -70,7 +59,20 @@ Global
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x64.Build.0 = Release|Any CPU
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x86.ActiveCfg = Release|Any CPU
{131A8C1E-C9F0-46FA-9B44-C234E2173429}.Release|x86.Build.0 = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|x64.ActiveCfg = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|x64.Build.0 = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|x86.ActiveCfg = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Debug|x86.Build.0 = Debug|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|Any CPU.Build.0 = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|x64.ActiveCfg = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|x64.Build.0 = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|x86.ActiveCfg = Release|Any CPU
{282D6679-D2C7-4259-9734-7C911D391B21}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Aspire.ServiceDefaults\Aspire.ServiceDefaults.csproj" />
</ItemGroup>

<!-- Constants and helpers -->
<ItemGroup>
<Compile Include="..\..\Shared\Constants.cs">
Expand Down
5 changes: 5 additions & 0 deletions IdentityServer/v8/Basics/MvcBackChannelLogout/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

builder.Services.AddControllersWithViews();
builder.Services.AddHttpClient();

Expand Down Expand Up @@ -62,6 +65,8 @@

var app = builder.Build();

app.MapDefaultEndpoints();

app.UseDeveloperExceptionPage();
app.UseStaticFiles();

Expand Down
1 change: 0 additions & 1 deletion IdentityServer/v8/Basics/MvcPar/src/Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<PackageReference Include="Duende.AccessTokenManagement.OpenIdConnect"/>
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect"/>
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>

<!-- Constants and helpers -->
Expand Down
8 changes: 0 additions & 8 deletions IdentityServer/v8/Basics/MvcPar/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,11 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using Serilog;

Console.Title = "MvcPar";

Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.Enrich.FromLogContext()
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}")
.CreateLogger();

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSerilog();
builder.Services.AddTransient<ParOidcEvents>();
builder.Services.AddSingleton<IDiscoveryCache>(_ => new DiscoveryCache(Urls.IdentityServer));

Expand Down
Loading
Loading