Duende Software Open Source Libraries

repository·main·Indexed 41 days ago

https://github.com/duendesoftware/foss

A collection of open-source .NET libraries specializing in OAuth 2.0, OpenID Connect, and identity management. Includes Duende.AccessTokenManagement for automating token lifecycles in M2M and user-centric flows, Duende.IdentityModel for foundational claims-based identity, and Duende.IdentityModel.OidcClient for implementing OIDC login flows across .NET MAUI, WPF, WinForms, and console applications.

Tokens
6.7K
Snippets
12
Records
46
Agent score
49%

What's inside Duende FOSS

  1. Overview of Duende.IdentityModel

    main

    Duende.IdentityModel is a .NET library designed for claims-based identity, OAuth 2.0, and OpenID Connect. It provides a standardized object model to interact with OAuth and OpenID Connect specification endpoints.

    Key features include:

    • Request/Response Types: Strongly typed objects representing specification-defined requests and responses.
    • Extension Methods: Methods to simplify invoking identity-related requests.
    • Specification Constants: Pre-defined constants for standard scopes, claims, and parameter names.
    • Convenience Methods: Utilities for performing common identity operations.

    Compatibility: The library targets .NET Standard 2.0, ensuring it can be used in both .NET and .NET Framework applications.

  2. Overview of Trimmable Analysis

    main

    This project is designed to facilitate the analysis of trimmable warnings in .NET applications. Trimming is a deployment technique that reduces the size of your application by removing unused code. This project helps identify potential issues where code might be incorrectly removed during the trimming process.

    For detailed information on how to prepare libraries for trimming in .NET, refer to the official Microsoft documentation.

  3. Overview of Duende.IdentityModel.OidcClient

    main

    Duende.IdentityModel.OidcClient is an OpenID Connect (OIDC) client library designed specifically for native applications. It targets .NET Standard, ensuring compatibility with both .NET and .NET Framework.

    The library provides two levels of functionality:

    1. Low-level: Types for describing OIDC requests and responses, and methods to construct protocol state and handle responses.
    2. High-level: Simplified methods for common OIDC workflows including:
      • Logging in
      • Logging out
      • Retrieving userinfo
      • Refreshing tokens
  4. Overview of Duende Free and Open Source Software

    main

    This repository serves as a collection of Duende's open-source .NET libraries focused on identity, OAuth 2.0, and OpenID Connect. These libraries are maintained by Duende Software and are designed to be interoperable.

    Available projects include:

    • Duende.AccessTokenManagement: .NET libraries for managing OAuth and OpenID Connect access tokens.
    • Duende.AspNetCore.Authentication.OAuth2Introspection: An ASP.NET Authentication handler specifically for OAuth 2.0 introspection.
    • Duende.IdentityModel: .NET libraries for claims-based identity, OAuth 2.0, and OpenID Connect.
    • Duende.IdentityModel.OidcClient: .NET libraries for building OpenID Connect (OIDC) native clients.
  5. Overview of Duende.Extensions.Caching.Memory

    main
    Duende.Extensions.Caching.Memory is a wrapper around Microsoft.Extensions.Caching.Memory.MemoryCache that integrates with .NET's TimeProvider abstraction. It is designed to enable testable time-dependent caching, allowing developers to manipulate time in unit tests (using FakeTimeProvider) to verify cache expiration behavior without relying on real-world delays. It maintains full compatibility with the standard IMemoryCache interface.
  6. Overview of Duende.AccessTokenManagement.OpenIdConnect

    main

    Duende.AccessTokenManagement.OpenIdConnect is a .NET library designed for ASP.NET Core applications to manage OpenId Connect access tokens.

    Key capabilities include:

    • Automatic Token Acquisition: Automatically acquires new tokens before existing ones expire.
    • HTTP Client Integration: Provides conveniences to automatically attach the current valid token to outgoing HTTP requests.
    • Token Revocation: Can revoke refresh tokens that are no longer required by the application.
  7. What is Duende.IdentityModel.OidcClient.Extensions?

    main

    Duende.IdentityModel.OidcClient.Extensions is an add-on package for the core Duende.IdentityModel.OidcClient library. It provides advanced features that require additional dependencies not present in the core package, helping to avoid transitive dependency conflicts in your project.

    Currently, the primary feature provided by this extensions package is support for DPoP (Demonstrating Proof-of-Possession) extensions, which are used for sender-constraining tokens according to RFC 9449.

  8. Overview of Duende.AccessTokenManagement

    main

    Duende.AccessTokenManagement is a set of .NET libraries designed to manage OAuth and OpenID Connect access tokens. It automates several key token lifecycle tasks:

    • Automatic Acquisition: Automatically requests new tokens before existing ones expire.
    • HTTP Client Integration: Provides conveniences for attaching the current valid token to outgoing HTTP requests.
    • Token Revocation: Provides mechanisms to revoke tokens that are no longer required.
  9. Overview of Duende.RazorSlices

    main

    Duende.RazorSlices is a vendored fork of the DamianEdwards/RazorSlices project. It is maintained by Duende for supply-chain control, allowing for independent security patching and pinned source versions. It enables the use of Razor files as request handlers in ASP.NET Core applications.

    Key changes from the upstream version:

    • The namespace, package ID, and assembly name have been updated to use the Duende.* prefix.
    • The source generator package is now Duende.RazorSlices.SourceGenerator.
    • The target framework has been updated to net10.0.
  10. WPF Sample Overview for Duende.IdentityModel.OidcClient

    main

    This sample demonstrates how to build a Windows desktop application using WPF and Duende.IdentityModel.OidcClient. It implements a secure authentication flow using the following patterns:

    • Manual Mode: Uses the system browser for interactive protocol flows.
    • Custom URI Schemes: Listens for callbacks on a private-use URI scheme to avoid firewall or port-blocking issues.
    • DPoP (Demonstrating Proof-of-Possession): Protects obtained tokens from replay attacks by binding them to a secret key.
    • DPAPI Protection: Uses the operating system's Data Protection API (DPAPI) to protect the DPoP key and stored session information.
  11. Analyze trimmable warnings with TrimmableAnalysis

    main
    The TrimmableAnalysis project is designed to facilitate the analysis of warnings related to .NET trimming. It helps developers identify potential issues when preparing libraries for deployment in trimmed environments. For foundational knowledge on how to prepare libraries for trimming, refer to the official Microsoft documentation.