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,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>
11 changes: 11 additions & 0 deletions IdentityServer/v7/Basics/MvcJarJwt/MvcJarJwt.AppHost/Program.cs
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");

var api = builder.AddProject<Projects.SimpleApi>("simple-api");

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

builder.Build().Run();
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:15237",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:21137",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22137"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17237;http://localhost:15237",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21137",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22137"
}
}
}
}
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"
}
}
}
14 changes: 14 additions & 0 deletions IdentityServer/v7/Basics/MvcJarJwt/MvcJarJwt.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\Sim
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..\IdentityServerHost\src\IdentityServerHost.csproj", "{7BCF45DF-B314-48E0-86A1-90886840804A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcJarJwt.AppHost", "MvcJarJwt.AppHost\MvcJarJwt.AppHost.csproj", "{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -70,6 +72,18 @@ Global
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x64.Build.0 = Release|Any CPU
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x86.ActiveCfg = Release|Any CPU
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x86.Build.0 = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|x64.ActiveCfg = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|x64.Build.0 = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|x86.ActiveCfg = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Debug|x86.Build.0 = Debug|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|Any CPU.Build.0 = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|x64.ActiveCfg = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|x64.Build.0 = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|x86.ActiveCfg = Release|Any CPU
{B3C2D4E5-F6A7-4B8C-9D0E-F1A2B3C4D5E6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection
Expand Down
4 changes: 4 additions & 0 deletions IdentityServer/v7/Basics/MvcJarJwt/src/Client.csproj
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/MvcJarJwt/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

JwtSecurityTokenHandler.DefaultMapInboundClaims = false;

builder.Services.AddControllersWithViews();
Expand Down Expand Up @@ -97,6 +100,8 @@

var app = builder.Build();

app.MapDefaultEndpoints();

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

Expand Down
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>
11 changes: 11 additions & 0 deletions IdentityServer/v8/Basics/MvcJarJwt/MvcJarJwt.AppHost/Program.cs
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");

var api = builder.AddProject<Projects.SimpleApi>("simple-api");

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

builder.Build().Run();
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"
}
}
}
14 changes: 14 additions & 0 deletions IdentityServer/v8/Basics/MvcJarJwt/MvcJarJwt.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApi", "..\..\Apis\Sim
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServerHost", "..\..\IdentityServerHost\src\IdentityServerHost.csproj", "{7BCF45DF-B314-48E0-86A1-90886840804A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcJarJwt.AppHost", "MvcJarJwt.AppHost\MvcJarJwt.AppHost.csproj", "{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -70,6 +72,18 @@ Global
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x64.Build.0 = Release|Any CPU
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x86.ActiveCfg = Release|Any CPU
{7BCF45DF-B314-48E0-86A1-90886840804A}.Release|x86.Build.0 = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|x64.ActiveCfg = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|x64.Build.0 = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Debug|x86.Build.0 = Debug|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|Any CPU.Build.0 = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|x64.ActiveCfg = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|x64.Build.0 = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|x86.ActiveCfg = Release|Any CPU
{A2B1C3D4-E5F6-4A7B-8C9D-E0F1A2B3C4D5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection
Expand Down
4 changes: 4 additions & 0 deletions IdentityServer/v8/Basics/MvcJarJwt/src/Client.csproj
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/MvcJarJwt/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

JwtSecurityTokenHandler.DefaultMapInboundClaims = false;

builder.Services.AddControllersWithViews();
Expand Down Expand Up @@ -97,6 +100,8 @@

var app = builder.Build();

app.MapDefaultEndpoints();

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

Expand Down
2 changes: 2 additions & 0 deletions samples.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
<Project Path="IdentityServer/v7/Basics/MvcBasic/src/Client.csproj" />
</Folder>
<Folder Name="/IdentityServer/v7/Basics/MvcJarJwt/">
<Project Path="IdentityServer/v7/Basics/MvcJarJwt/MvcJarJwt.AppHost/MvcJarJwt.AppHost.csproj" />
<Project Path="IdentityServer/v7/Basics/MvcJarJwt/src/Client.csproj" />
</Folder>
<Folder Name="/IdentityServer/v7/Basics/MvcPar/">
Expand Down Expand Up @@ -449,6 +450,7 @@
<Project Path="IdentityServer/v8/Basics/MvcBasic/src/Client.csproj" />
</Folder>
<Folder Name="/IdentityServer/v8/Basics/MvcJarJwt/">
<Project Path="IdentityServer/v8/Basics/MvcJarJwt/MvcJarJwt.AppHost/MvcJarJwt.AppHost.csproj" />
<Project Path="IdentityServer/v8/Basics/MvcJarJwt/src/Client.csproj" />
</Folder>
<Folder Name="/IdentityServer/v8/Basics/MvcPar/">
Expand Down
Loading