Skip to content

Commit 1c1c064

Browse files
RolandGuijtroland
andauthored
Introduce centralized package management for IS v8 samples (#320)
* Introduce package management for IS v8 demos. * Fix Otel project deps --------- Co-authored-by: roland <roland.guijt@gmail.com>
1 parent a2c2871 commit 1c1c064

114 files changed

Lines changed: 352 additions & 284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IdentityServer/v8/Apis/ResourceBasedApi/ResourceBasedApi.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="6.2.0" />
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
8+
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" />
9+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
1010

11-
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
11+
<PackageReference Include="Serilog.AspNetCore" />
1212
</ItemGroup>
1313

1414
<!-- Constants and helpers -->

IdentityServer/v8/Apis/SimpleApi/SimpleApi.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
10-
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
9+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
10+
<PackageReference Include="Serilog.AspNetCore" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

IdentityServer/v8/AspNetIdentity/Client/Client.csproj

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

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.5" />
9+
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
1010
</ItemGroup>
1111

1212
</Project>

IdentityServer/v8/AspNetIdentity/IdentityServerAspNetIdentity/IdentityServerAspNetIdentity.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="8.0.0-alpha.1" />
10+
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" />
1111

12-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.5" />
13-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.5" />
14-
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.5" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.5" />
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.5" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.5" />
18-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
13+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
14+
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" />
18+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

IdentityServer/v8/AspNetIdentityPasskeys/IdentityServerAspNetIdentityPasskeys/IdentityServerAspNetIdentityPasskeys.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" version="8.0.0-alpha.1" />
10-
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
9+
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" />
10+
<PackageReference Include="Serilog.AspNetCore" />
1111

12-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.5" />
13-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.5" />
14-
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.5" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.5" />
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.5">
12+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
13+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
14+
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>

IdentityServer/v8/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.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" />
13+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" />
14+
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" />
15+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
16+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
17+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
18+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
19+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" />
2020
</ItemGroup>
2121

2222
</Project>

IdentityServer/v8/Basics/ClientCredentials/src/Client.csproj

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

88
<ItemGroup>
9-
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
9+
<PackageReference Include="Duende.IdentityModel" />
1010
</ItemGroup>
1111

1212
<!-- Constants and helpers -->

IdentityServer/v8/Basics/Introspection/src/Client.csproj

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

88
<ItemGroup>
9-
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
9+
<PackageReference Include="Duende.IdentityModel" />
1010
</ItemGroup>
1111

1212
<!-- Constants and helpers -->

IdentityServer/v8/Basics/JwtBasedClientAuthentication/src/Client.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.1" />
10-
<PackageReference Include="Duende.IdentityModel" Version="7.1.0" />
9+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
10+
<PackageReference Include="Duende.IdentityModel" />
1111
</ItemGroup>
1212

1313
<!-- Constants and helpers -->

IdentityServer/v8/Basics/JwtBasedClientAuthentication/src/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static async Task<TokenResponse> RequestTokenAsync(SigningCredentials signingCre
6262

6363
static string CreateClientToken(SigningCredentials credential, string clientId, string audience)
6464
{
65-
var now = DateTime.UtcNow;
65+
var now = DateTimeOffset.UtcNow;
6666

6767
var token = new JwtSecurityToken(
6868
clientId,
@@ -71,10 +71,10 @@ static string CreateClientToken(SigningCredentials credential, string clientId,
7171
{
7272
new Claim(JwtClaimTypes.JwtId, Guid.NewGuid().ToString()),
7373
new Claim(JwtClaimTypes.Subject, clientId),
74-
new Claim(JwtClaimTypes.IssuedAt, now.ToEpochTime().ToString(), ClaimValueTypes.Integer64)
74+
new Claim(JwtClaimTypes.IssuedAt, now.ToUnixTimeSeconds().ToString(), ClaimValueTypes.Integer64)
7575
},
76-
now,
77-
now.AddMinutes(1),
76+
now.UtcDateTime,
77+
now.UtcDateTime.AddMinutes(1),
7878
credential
7979
);
8080

0 commit comments

Comments
 (0)