diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a3adf90..8e9e7b1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -33,6 +33,15 @@ body: validations: required: true + - type: textarea + id: description + attributes: + label: Description of the problem + description: | + Describe as exactly as possible what is not working. + validations: + required: true + - type: textarea id: steps-to-reproduce attributes: @@ -47,20 +56,6 @@ body: validations: required: true - - type: textarea - id: expected-behavior - attributes: - label: Expected behavior - description: | - Tell us what you expect to happen. - - - type: textarea - id: actual-behavior - attributes: - label: Actual behavior - description: | - Tell us what happens with the steps given above. - - type: textarea id: additional-information attributes: diff --git a/.github/workflows/image-vuln-scan.yml b/.github/workflows/image-vuln-scan.yml index 06f5afa..39f1730 100644 --- a/.github/workflows/image-vuln-scan.yml +++ b/.github/workflows/image-vuln-scan.yml @@ -20,13 +20,13 @@ jobs: - uses: actions/checkout@v4 - name: Scan - Full - uses: aquasecurity/trivy-action@0.30.0 + uses: aquasecurity/trivy-action@0.31.0 with: image-ref: ${{ env.TRIVYY_IMAGE_REF }} - name: Scan - Relevant id: scan_relevant - uses: aquasecurity/trivy-action@0.30.0 + uses: aquasecurity/trivy-action@0.31.0 with: image-ref: ${{ env.TRIVYY_IMAGE_REF }} exit-code: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c3e47..796e438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.0.10 +* Backported some cleanup commits from upstream +* Updated dependencies + # 1.0.9 * Updated dependencies diff --git a/src/Helpers/AspNetServicesHelper.cs b/src/Helpers/AspNetServicesHelper.cs index e156a74..3596f46 100644 --- a/src/Helpers/AspNetServicesHelper.cs +++ b/src/Helpers/AspNetServicesHelper.cs @@ -6,19 +6,19 @@ namespace OpenIdConnectServer.Helpers { public class AspNetServicesOptions { - public AspNetCorsOptions Cors { get; set; } + public AspNetCorsOptions? Cors { get; set; } - public IDictionary Authentication { get; set; } - public SessionOptions Session { get; set; } + public IDictionary? Authentication { get; set; } + public SessionOptions? Session { get; set; } - public ForwardedHeadersOptions ForwardedHeadersOptions { get; set; } + public ForwardedHeadersOptions? ForwardedHeadersOptions { get; set; } - public string BasePath { get; set; } + public string? BasePath { get; set; } } public class AuthenticationOptions { - public CookieAuthenticationOptions CookieAuthenticationOptions { get; set; } + public CookieAuthenticationOptions? CookieAuthenticationOptions { get; set; } } public static class AspNetServicesHelper diff --git a/src/OpenIdConnectServerMock.csproj b/src/OpenIdConnectServerMock.csproj index c25fdae..63ece27 100644 --- a/src/OpenIdConnectServerMock.csproj +++ b/src/OpenIdConnectServerMock.csproj @@ -26,9 +26,9 @@ - - - + + + diff --git a/src/Program.cs b/src/Program.cs index 8375efe..2ded708 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -53,6 +53,7 @@ var app = builder.Build(); +app.UsePathBase(Config.GetAspNetServicesOptions().BasePath); var aspNetServicesOptions = Config.GetAspNetServicesOptions(); AspNetServicesHelper.ConfigureAspNetServices(builder.Services, aspNetServicesOptions); @@ -65,16 +66,6 @@ app.UseIdentityServer(); -var basePath = Config.GetAspNetServicesOptions().BasePath; -if (!string.IsNullOrEmpty(basePath)) -{ - app.UseWhen(ctx => ctx.Request.Path.StartsWithSegments(basePath), appBuilder => - { - appBuilder.UseMiddleware(); - appBuilder.UseMiddleware(); - }); -} - app.UseHttpsRedirection(); var manifestEmbeddedProvider = new ManifestEmbeddedFileProvider(typeof(Program).Assembly, "wwwroot"); @@ -84,13 +75,8 @@ }); app.UseRouting(); - app.UseAuthorization(); -app.UseEndpoints(endpoints => - { - endpoints.MapDefaultControllerRoute(); - }); - +app.MapDefaultControllerRoute(); app.MapRazorPages(); app.Run();