Skip to content
Open
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
12 changes: 6 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
<!-- IdentityServer -->
<PackageVersion Include="Duende.IdentityServer" Version="7.3.2" />
<PackageVersion Include="Duende.IdentityServer.AspNetIdentity" Version="7.3.2" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework" Version="7.3.2" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework.Storage" Version="7.3.2" />
<PackageVersion Include="Duende.IdentityServer.Storage" Version="7.3.2" />
<PackageVersion Include="Duende.IdentityServer" Version="7.4.5" />
<PackageVersion Include="Duende.IdentityServer.AspNetIdentity" Version="7.4.5" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework" Version="7.4.5" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework.Storage" Version="7.4.5" />
<PackageVersion Include="Duende.IdentityServer.Storage" Version="7.4.5" />
<!-- Scaffolding -->
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0-rc.1.23461.3" />
<!-- Grpc -->
Expand All @@ -89,7 +89,7 @@
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="3.0.71" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.1" />
<PackageVersion Include="IdentityModel" Version="7.0.0" />
<PackageVersion Include="Duende.IdentityModel" Version="8.0.0" />
<PackageVersion Include="Scalar.AspNetCore" Version="2.8.6" />
<!-- Before license change -->
<PackageVersion Include="MediatR" Version="13.0.0" />
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ Notes:
- Report any issues to [azure-dev](https://github.com/Azure/azure-dev/issues) repo.
- [FAQ and troubleshoot](https://learn.microsoft.com/azure/developer/azure-developer-cli/troubleshoot?tabs=Browser) for azd.

## Third-party

### Duende IdentityServer

The eShop application uses [Duende IdentityServer](https://duendesoftware.com/products/identityserver/), which is software that may require a license when deploying to a production environment. Depending on revenue, a free [community edition](https://duendesoftware.com/products/communityedition/) is available for production use.

For development, testing, and general exploration, no license is needed.

## Contributing

For more information on contributing to this repo, read [the contribution documentation](./CONTRIBUTING.md) and [the Code of Conduct](CODE-OF-CONDUCT.md).
Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/ClientApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Duende.IdentityModel.OidcClient" Version="7.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.30" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.30" />
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="9.0.30" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
<PackageReference Include="IdentityModel" Version="7.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
using eShop.ClientApp.Services.Settings;
using eShop.ClientApp.Services.Theme;
using eShop.ClientApp.Views;
using IdentityModel.OidcClient;
using Duende.IdentityModel.OidcClient;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using IBrowser = IdentityModel.OidcClient.Browser.IBrowser;
using IBrowser = Duende.IdentityModel.OidcClient.Browser.IBrowser;

namespace eShop.ClientApp;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientApp/Services/Identity/IdentityService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using eShop.ClientApp.Models.Token;
using eShop.ClientApp.Models.User;
using eShop.ClientApp.Services.Settings;
using IdentityModel.OidcClient;
using IBrowser = IdentityModel.OidcClient.Browser.IBrowser;
using Duende.IdentityModel.OidcClient;
using IBrowser = Duende.IdentityModel.OidcClient.Browser.IBrowser;

namespace eShop.ClientApp.Services.Identity;

Expand Down
1 change: 1 addition & 0 deletions src/ClientApp/Services/RequestProvider/RequestProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;
using Duende.IdentityModel.Client;
using eShop.ClientApp.Exceptions;

namespace eShop.ClientApp.Services.RequestProvider;
Expand Down
6 changes: 3 additions & 3 deletions src/ClientApp/Views/MauiAuthenticationBrowser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using IdentityModel.Client;
using IdentityModel.OidcClient.Browser;
using IBrowser = IdentityModel.OidcClient.Browser.IBrowser;
using Duende.IdentityModel.Client;
using Duende.IdentityModel.OidcClient.Browser;
using IBrowser = Duende.IdentityModel.OidcClient.Browser.IBrowser;

namespace eShop.ClientApp.Views;

Expand Down
4 changes: 2 additions & 2 deletions src/Identity.API/Configuration/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static IEnumerable<ApiResource> GetApis()
}

// ApiScope is used to protect the API
//The effect is the same as that of API resources in IdentityServer 3.x
// The effect is the same as that of API resources in IdentityServer 3.x
public static IEnumerable<ApiScope> GetApiScopes()
{
return new List<ApiScope>
Expand All @@ -26,7 +26,7 @@ public static IEnumerable<ApiScope> GetApiScopes()
}

// Identity resources are data like user ID, name, or email address of a user
// see: http://docs.identityserver.io/en/release/configuration/resources.html
// see: https://docs.duendesoftware.com/identityserver/fundamentals/resources/identity/
public static IEnumerable<IdentityResource> GetResources()
{
return new List<IdentityResource>
Expand Down
2 changes: 2 additions & 0 deletions src/Identity.API/Identity.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" />
<PackageReference Include="Duende.IdentityServer.EntityFramework" />
<PackageReference Include="Duende.IdentityServer.EntityFramework.Storage" />
<PackageReference Include="Duende.IdentityServer.Storage" />
<PackageReference Include="Duende.IdentityServer" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.


using System.Buffers.Text;
using System.Text;
using System.Text.Json;

Expand All @@ -16,7 +17,7 @@ public DiagnosticsViewModel(AuthenticateResult result)
if (result.Properties.Items.ContainsKey("client_list"))
{
var encoded = result.Properties.Items["client_list"];
var bytes = Base64Url.Decode(encoded);
var bytes = Base64Url.DecodeFromChars(encoded);
var value = Encoding.UTF8.GetString(bytes);

Clients = JsonSerializer.Deserialize<string[]>(value);
Expand Down
2 changes: 1 addition & 1 deletion src/Identity.API/Views/Account/Logout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="logout-page">
<div class="lead">
<h1>Logout</h1>
<p>Would you like to logut of IdentityServer?</p>
<p>Would you like to logout of IdentityServer?</p>
</div>

<form asp-action="Logout">
Expand Down
7 changes: 4 additions & 3 deletions src/Identity.API/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="welcome-page">
<h1>
<img src="~/icon.jpg">
Welcome to IdentityServer4
Welcome to Duende IdentityServer
<small class="text-muted">(version @version)</small>
</h1>

Expand All @@ -25,8 +25,9 @@
</li>
<li>
Here are links to the
<a href="https://github.com/identityserver/IdentityServer4">source code repository</a>,
and <a href="https://github.com/IdentityServer/IdentityServer4/tree/main/samples">ready to use samples</a>.
<a href="https://github.com/duendesoftware/products">source code repository</a>,
<a href="https://github.com/duendesoftware/samples">ready to use samples</a>,
and <a href="https://docs.duendesoftware.com">documentation</a>.
</li>
</ul>
</div>