This repository is a practical implementation of the Duende IdentityServer Quickstarts, based on the official guide:
👉 IdentityServer Quickstart Overview
- 🌐 IdentityServer Website: https://duendesoftware.com
- 📖 Documentation: https://docs.duendesoftware.com/identityserver
- 💻 Duende GitHub Repositories: https://github.com/DuendeSoftware
This implementation consists of three main projects:
- IdentityServer
- Implements the Identity Server itself
- Uses ASP.NET Identity for user management
- Configured with Duende IdentityServer to issue tokens (Access, Refresh, ID tokens)
- Backed by Entity Framework for persistence
- APIResource
- An ASP.NET Core API project
- Represents a protected resource that requires tokens issued by IdentityServer
- Demonstrates how APIs validate tokens and enforce scopes/claims
- WebClient
- An ASP.NET MVC (.NET 8) client application
- Integrates with IdentityServer for login/logout
- Consumes
APIResourceusing secure access tokens
This solution is designed as a reference implementation to:
- Learn and experiment with Duende
IdentityServer - Demonstrate how to secure APIs and clients with OAuth 2.0 / OIDC
- Provide a starting point for building scalable, real-world identity infrastructures
- .NET 8 SDK
- [SQL Server / SQLite / PostgreSQL] (depending on your Entity Framework provider)
- An IDE such as Visual Studio 2022
- Add IdentityServer templates for dotnet CLI
dotnet new install Duende.Templates
- Clone the repository
git clone https://github.com/MhSaleemAlZayat/IdentityServer.dotnet8.Implementation.git
cd your-repo-name
- Go to
appsettings.jsoninIdentityServerproject and uncommitDefaultConnectionthen change connection string setting
//"DefaultConnection": "Server={YOUR-SERVER-NAME};Database=IdentityServer;User Id={YOUR-USER-ID}; Password={YOUR-PASSWORD};Trusted_Connection=False;MultipleActiveResultSets=true;Encrypt=False"- Run the projects
- Start IdentityServer first
- Then run APIResource
- Finally, run WebClient
- Test the flow
- Navigate to
https://localhost:5003 - Login via IdentityServer using
ahmedorsamirawithP@ssw0rdpassword. - Access the protected API through the WebClient
- Nagigate to
https://localhost:5003/Home/BrowseEmployeesto browse the randome employees.