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
4 changes: 2 additions & 2 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- run: mv .github/.lycheeignore .lycheeignore

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2
with:
fail: false # Don't fail on broken links, create an issue instead

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

# Build entirely in docker
- uses: docker/setup-qemu-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-vuln-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true # Ignore errors, we create an issue instead
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Scan - Full
uses: aquasecurity/trivy-action@0.33.1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

# Build entirely in docker
- uses: docker/setup-qemu-action@v3
Expand All @@ -35,7 +35,7 @@ jobs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
version: ${{ steps.version.outputs.release }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Configure Git
run: |
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
attestations: write
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Init Git and pull
run: |
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
runs-on: ubuntu-latest
needs: [publish-docker]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Init Git and pull
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
sparse-checkout: .github/labels.yml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
attestations: write
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: docker/setup-qemu-action@v3

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-from-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }}
create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# Required because otherwise there are always changes detected when executing diff/rev-list
fetch-depth: 0
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
if: needs.update.outputs.create_update_branch_merged_pr == 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# Required because otherwise there are always changes detected when executing diff/rev-list
fetch-depth: 0
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ obj
# Docker
.docker

# UI
src/Pages
src/wwwroot

# Runtime data
keys
tempkey.jwk
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.2.0
* Updated dependencies
* Updated ``Duende.IdentityServer`` to ``7.4``
* Updated to .NET 10

# 1.1.3
* Updated dependencies

Expand Down
4 changes: 2 additions & 2 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"datasources": [
"docker"
],
"allowedVersions": "<9"
"allowedVersions": "<11"
},
{
"description": "Stick with .NET LTS",
Expand All @@ -21,7 +21,7 @@
"datasources": [
"nuget"
],
"allowedVersions": "<9"
"allowedVersions": "<11"
},
{
"description": "Group aspnetcore",
Expand Down
3 changes: 0 additions & 3 deletions src/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
bin/
obj/

Pages
wwwroot

keys/
tempkey.jwk

Expand Down
15 changes: 15 additions & 0 deletions src/.idea/.idea.OpenIdConnectServerMock/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/.idea/.idea.OpenIdConnectServerMock/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/.idea/.idea.OpenIdConnectServerMock/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/.idea/.idea.OpenIdConnectServerMock/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
# Stage 1: Build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS source
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS source
ARG TARGETARCH
ARG target="Release"

RUN apk add --no-cache unzip curl bash

WORKDIR /src

COPY ./getui.sh ./getui.sh
RUN ./getui.sh

COPY ./OpenIdConnectServerMock.csproj ./OpenIdConnectServerMock.csproj
RUN dotnet restore -a $TARGETARCH

COPY . .

RUN dotnet publish -a $TARGETARCH -c $target -o obj/docker/publish
RUN dotnet publish -a $TARGETARCH -c $target --property:PublishDir=obj/docker/publish

RUN cp -r /src/obj/docker/publish /OpenIdConnectServerMock

# Stage 2: Release
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS release
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS release
ARG target="Release"

RUN apk add --no-cache curl
Expand All @@ -34,7 +31,7 @@ ENV ASPNETCORE_ENVIRONMENT=Development
EXPOSE 80
EXPOSE 443

HEALTHCHECK --start-period=2s --interval=1s --timeout=100ms --retries=10 \
HEALTHCHECK --start-period=2s --interval=5s --timeout=1s --retries=10 \
CMD curl -k --location https://localhost/health || exit 1

ENTRYPOINT ["dotnet", "OpenIdConnectServerMock.dll" ]
12 changes: 6 additions & 6 deletions src/OpenIdConnectServerMock.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>

<IsPackable>true</IsPackable>
<Description>Configurable mock server with OpenId Connect functionality</Description>
<VersionPrefix>1.1.4-SNAPSHOT</VersionPrefix>
<VersionPrefix>1.2.0-SNAPSHOT</VersionPrefix>
<PackageProjectUrl>https://github.com/xdev-software/oidc-server-mock</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageTags>OIDC</PackageTags>
Expand All @@ -26,10 +26,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="7.3.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.21" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.21" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Duende.IdentityServer" Version="7.4.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
</ItemGroup>

Expand Down
10 changes: 10 additions & 0 deletions src/Pages/Account/AccessDenied.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@page
@model IdentityServerHost.Pages.Account.AccessDeniedModel
@{
}
<div class="row">
<div class="col">
<h1>Access Denied</h1>
<p>You do not have permission to access that resource.</p>
</div>
</div>
10 changes: 10 additions & 0 deletions src/Pages/Account/AccessDenied.cshtml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace IdentityServerHost.Pages.Account;

public class AccessDeniedModel : PageModel
{
public void OnGet()
{
}
}
40 changes: 40 additions & 0 deletions src/Pages/Account/Create/Index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@page
@model IdentityServerHost.Pages.Create.Index

<div class="login-page">
<div class="lead">
<h1>Create Account</h1>
</div>

<partial name="_ValidationSummary" />

<div class="row">

<div class="col-sm-6">
<form asp-page="/Account/Create/Index">
<input type="hidden" asp-for="Input.ReturnUrl" />

<div class="form-group">
<label asp-for="Input.Username"></label>
<input class="form-control" placeholder="Username" asp-for="Input.Username" autofocus>
</div>
<div class="form-group">
<label asp-for="Input.Password"></label>
<input type="password" class="form-control" placeholder="Password" asp-for="Input.Password" autocomplete="off">
</div>
<div class="form-group">
<label asp-for="Input.Name"></label>
<input type="text" class="form-control" placeholder="Name" asp-for="Input.Name">
</div>
<div class="form-group">
<label asp-for="Input.Email"></label>
<input type="email" class="form-control" placeholder="Email" asp-for="Input.Email" >
</div>

<button class="btn btn-primary" name="Input.Button" value="create">Create</button>
<button class="btn btn-secondary" name="Input.Button" value="cancel">Cancel</button>
</form>
</div>

</div>
</div>
Loading