Skip to content

Commit a2c2871

Browse files
RolandGuijtroland
andauthored
Update CIBA sample (#319)
* Update Ciba sample, add aspire, add README.md * Update NuGet packages --------- Co-authored-by: roland <roland.guijt@gmail.com>
1 parent da177e3 commit a2c2871

39 files changed

Lines changed: 263 additions & 264 deletions

IdentityServer/v7/Apis/SimpleApi/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
var builder = WebApplication.CreateBuilder(args);
1919

20+
builder.AddServiceDefaults();
21+
2022
builder.Services.AddSerilog();
2123

2224
builder.Services.AddControllers();
@@ -40,6 +42,8 @@
4042

4143
var app = builder.Build();
4244

45+
app.MapDefaultEndpoints();
46+
4347
app.UseRouting();
4448
app.UseAuthentication();
4549
app.UseAuthorization();

IdentityServer/v7/Apis/SimpleApi/SimpleApi.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
10-
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
10+
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<ProjectReference Include="..\..\Aspire.ServiceDefaults\Aspire.ServiceDefaults.csproj" />
1115
</ItemGroup>
1216

1317
<!-- Constants and helpers -->

IdentityServer/v7/Aspire.ServiceDefaults/Aspire.ServiceDefaults.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<ItemGroup>
1111
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
1212

13-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.1.0"/>
14-
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.1.0"/>
15-
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0"/>
16-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0"/>
17-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0"/>
18-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0"/>
19-
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0"/>
13+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.4.0" />
14+
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.4.0" />
15+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.1" />
16+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.15.1" />
17+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.15.1" />
18+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.15.0" />
19+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.15.0" />
2020
</ItemGroup>
2121

2222
</Project>

IdentityServer/v7/UserInteraction/Ciba/Api/Api.csproj

Lines changed: 0 additions & 13 deletions
This file was deleted.

IdentityServer/v7/UserInteraction/Ciba/Api/Constants.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

IdentityServer/v7/UserInteraction/Ciba/Api/IdentityController.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

IdentityServer/v7/UserInteraction/Ciba/Api/Program.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

IdentityServer/v7/UserInteraction/Ciba/Api/Properties/launchSettings.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

IdentityServer/v7/UserInteraction/Ciba/Client/Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
10+
<PackageReference Include="Duende.IdentityModel" Version="8.1.0" />
1111
</ItemGroup>
1212

1313
</Project>

IdentityServer/v7/UserInteraction/Ciba/Client/TokenResponseExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Duende Software. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using System.Buffers.Text;
45
using System.Text;
56
using System.Text.Json;
67
using Duende.IdentityModel;
@@ -25,8 +26,8 @@ public static void Show(this TokenResponse response)
2526
var header = parts[0];
2627
var payload = parts[1];
2728

28-
Console.WriteLine(PrettyPrintJson(Encoding.UTF8.GetString(Base64Url.Decode(header))));
29-
Console.WriteLine(PrettyPrintJson(Encoding.UTF8.GetString(Base64Url.Decode(payload))));
29+
Console.WriteLine(PrettyPrintJson(Encoding.UTF8.GetString(Base64Url.DecodeFromChars(header))));
30+
Console.WriteLine(PrettyPrintJson(Encoding.UTF8.GetString(Base64Url.DecodeFromChars(payload))));
3031
}
3132
}
3233
else

0 commit comments

Comments
 (0)