Skip to content

Commit

Permalink
Update YamlDotNet
Browse files Browse the repository at this point in the history
Disable reload of the config, as M1 Macs don't support it.
Add build instructions to README
Add all claims without filtering
  • Loading branch information
nielses committed Jun 14, 2023
1 parent 84157e7 commit de37760
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# build docker image

`docker build -t skrymer/mock-oidc-server:1.0.4 ./src`

publish and build for arm and amd

`docker buildx build --platform linux/amd64,linux/arm64 -t skrymer/mock-oidc-server:1.0.4 --push ./src`

# OpenId Connect Server Mock

![Run Tests badge](https://github.com/Soluto/oidc-server-mock/workflows/Run%20Tests/badge.svg)
Expand Down
2 changes: 2 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ COPY --from=source /OpenIdConnectServerMock /OpenIdConnectServerMock
WORKDIR /OpenIdConnectServerMock

ENV ASPNETCORE_ENVIRONMENT=Development
# Disable reload of the config, as M1 Macs don't support it. See https://github.com/elsa-workflows/elsa-core/issues/3114
ENV ASPNETCORE_hostBuilder__reloadConfigOnChange: "false"

EXPOSE 80

Expand Down
8 changes: 4 additions & 4 deletions src/OpenIdConnectServerMock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="6.2.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.13" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.13" />
<PackageReference Include="Duende.IdentityServer" Version="6.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.16" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.16" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="YamlDotNet" Version="12.3.1" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>

</Project>
9 changes: 2 additions & 7 deletions src/Services/ProfileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ public Task GetProfileDataAsync(ProfileDataRequestContext context)
if (user != null)
{
Logger.LogDebug("The user was found in store");
var claims = new List<Claim>
{
new Claim("uid", subjectId),
};
Logger.LogDebug("Adding claims {claims}", claims);
context.IssuedClaims.AddRange(claims);
Logger.LogDebug("User claims {claims}", user.Claims);
context.IssuedClaims.AddRange(user.Claims);
}


return Task.CompletedTask;
}

Expand Down

0 comments on commit de37760

Please sign in to comment.