# aguafrommars/theidserver architecture

> Architecture diagram of the GitHub repository aguafrommars/theidserver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aguafrommars/theidserver
- Repository: https://github.com/aguafrommars/theidserver

## Overview

TheIdServer is an identity and access-management product built around Duende IdentityServer, with SAML 2.0 and WS-Federation support and a Blazor administration app. Administrators manage users, roles, clients, APIs, scopes, identity resources, relying parties, providers, keys, and settings; applications and users then authenticate and authorize through the server’s protocol and consent flows. The README documents major capabilities beyond the sampled code, so those appear as subsystem nodes without speculative implementation-level links. Relationships are limited to documented capabilities and calls visible in the excerpts or source index.

Main entry points: [`src/Aguacongas.TheIdServer.Duende`](https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.Duende) (OIDC and OAuth), [`src/Aguacongas.TheIdServer.BlazorApp`](https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.BlazorApp) (Admin UI), [`src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/ApiScope.cs`](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/ApiScope.cs) (API and identity scopes), [`src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs`](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs) (Account authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration"]
  node_admin_ui["Admin UI"]
  node_client_admin["Client management<br/>[Client.razor.cs]"]
  node_api_admin["API management"]
  node_account_admin["User and role management<br/>[Services]"]
  node_other_admin["Other configuration"]
end

subgraph group_identity["Identity flows"]
  node_account["Account authentication"]
  node_consent["Authorization consent"]
  node_device["Device authorization"]
  node_ciba["CIBA requests<br/>[CibaController.cs]"]
  node_identity_stores["Identity stores<br/>[UserStore.cs]"]
end

subgraph group_protocols["Protocol services"]
  node_oidc_oauth["OIDC and OAuth"]
  node_saml["SAML 2.0"]
  node_wsfed["WS-Federation"]
end

subgraph group_platform["Configuration and data"]
  node_dynamic_providers["Dynamic providers"]
  node_admin_store[("Admin data store<br/>[IAdminStore.cs]")]
  node_client_entity["Client configuration<br/>[Client.cs]"]
  node_scope_entity["API and identity scopes<br/>[ApiScope.cs]"]
  node_identity_resource["Identity resources"]
  node_token_manager["OAuth token manager"]
end

node_administrator(("Administrator"))
node_client_app(("Client application"))
node_end_user(("End user"))

node_administrator -->|"configures"| node_admin_ui
node_admin_ui -->|"manages clients"| node_client_admin
node_admin_ui -->|"manages APIs"| node_api_admin
node_admin_ui -->|"manages accounts"| node_account_admin
node_admin_ui -->|"manages settings"| node_other_admin
node_client_admin -->|"edits"| node_client_entity
node_api_admin -->|"configures scopes"| node_scope_entity
node_account_admin -->|"administers users"| node_identity_stores
node_end_user -->|"authenticates"| node_account
node_account -->|"handles login"| node_oidc_oauth
node_account -.->|"continues authorization"| node_consent
node_client_app -->|"requests authorization"| node_oidc_oauth
node_end_user -->|"grants consent"| node_consent
node_end_user -->|"confirms device"| node_device
node_end_user -->|"responds to request"| node_ciba
node_consent -->|"presents scopes"| node_scope_entity
node_device -->|"presents scopes"| node_scope_entity
node_ciba -->|"presents scopes"| node_scope_entity
node_oidc_oauth -.->|"also supports"| node_saml
node_oidc_oauth -.->|"also supports"| node_wsfed
node_admin_ui -->|"configures providers"| node_dynamic_providers
node_oidc_oauth -.->|"uses provider hub"| node_dynamic_providers
node_oidc_oauth -.->|"uses configured stores"| node_admin_store
node_token_manager -->|"discovers token endpoint"| node_oidc_oauth
node_token_manager -->|"obtains access token"| node_client_app

click node_admin_ui "https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.BlazorApp"
click node_client_admin "https://github.com/aguafrommars/theidserver/blob/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor.cs"
click node_api_admin "https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Api"
click node_account_admin "https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure/Services"
click node_other_admin "https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure"
click node_account "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs"
click node_consent "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Consent/ConsentController.cs"
click node_device "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Device/DeviceController.cs"
click node_ciba "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Ciba/CibaController.cs"
click node_identity_stores "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Identity/UserStore.cs"
click node_oidc_oauth "https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.Duende"
click node_saml "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Duende/Aguacongas.IdentityServer.Saml2p.Duende/Saml2PController.cs"
click node_wsfed "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Duende/Aguacongas.IdentityServer.WsFederation.Duende/WsFederationController.cs"
click node_dynamic_providers "https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Authentication/DynamicProviderStore.cs"
click node_admin_store "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/IAdminStore.cs"
click node_client_entity "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/Client.cs"
click node_scope_entity "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/ApiScope.cs"
click node_identity_resource "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/IdentityResource.cs"
click node_token_manager "https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer/OAuthTokenManager.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_admin_ui,node_client_admin,node_api_admin,node_account_admin,node_other_admin,node_client_app,node_end_user toneBlue
class node_account,node_consent,node_device,node_ciba,node_identity_stores toneAmber
class node_oidc_oauth,node_saml,node_wsfed toneMint
class node_dynamic_providers,node_admin_store,node_client_entity,node_scope_entity,node_identity_resource,node_token_manager toneRose
class node_administrator toneIndigo
```

## Components

### Administration

- [Admin UI](https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.BlazorApp): `src/Aguacongas.TheIdServer.BlazorApp`
- [Client management](https://github.com/aguafrommars/theidserver/blob/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor.cs): `src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor.cs`
- [API management](https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Api): `src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Api`
- [User and role management](https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure/Services): `src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure/Services`
- [Other configuration](https://github.com/aguafrommars/theidserver/tree/master/src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure): `src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Infrastructure`

### Identity flows

- [Account authentication](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs): `src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs`
- [Authorization consent](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Consent/ConsentController.cs): `src/Aguacongas.TheIdServer.Duende/Quickstart/Consent/ConsentController.cs`
- [Device authorization](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Device/DeviceController.cs): `src/Aguacongas.TheIdServer.Duende/Quickstart/Device/DeviceController.cs`
- [CIBA requests](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Duende/Quickstart/Ciba/CibaController.cs): `src/Aguacongas.TheIdServer.Duende/Quickstart/Ciba/CibaController.cs`
- [Identity stores](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Identity/UserStore.cs): `src/Aguacongas.TheIdServer.Identity/UserStore.cs`

### Protocol services

- [OIDC and OAuth](https://github.com/aguafrommars/theidserver/tree/master/src/Aguacongas.TheIdServer.Duende): `src/Aguacongas.TheIdServer.Duende`
- [SAML 2.0](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Duende/Aguacongas.IdentityServer.Saml2p.Duende/Saml2PController.cs): `src/IdentityServer/Duende/Aguacongas.IdentityServer.Saml2p.Duende/Saml2PController.cs`
- [WS-Federation](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Duende/Aguacongas.IdentityServer.WsFederation.Duende/WsFederationController.cs): `src/IdentityServer/Duende/Aguacongas.IdentityServer.WsFederation.Duende/WsFederationController.cs`

### Configuration and data

- [Dynamic providers](https://github.com/aguafrommars/theidserver/blob/master/src/Aguacongas.TheIdServer.Authentication/DynamicProviderStore.cs): `src/Aguacongas.TheIdServer.Authentication/DynamicProviderStore.cs`
- [Admin data store](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/IAdminStore.cs): `src/IdentityServer/Aguacongas.IdentityServer.Store/IAdminStore.cs`
- [Client configuration](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/Client.cs): `src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/Client.cs`
- [API and identity scopes](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/ApiScope.cs): `src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/ApiScope.cs`
- [Identity resources](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/IdentityResource.cs): `src/IdentityServer/Aguacongas.IdentityServer.Store/Entity/IdentityResource.cs`
- [OAuth token manager](https://github.com/aguafrommars/theidserver/blob/master/src/IdentityServer/Aguacongas.IdentityServer/OAuthTokenManager.cs): `src/IdentityServer/Aguacongas.IdentityServer/OAuthTokenManager.cs`

### Other components

- **Administrator**
- **Client application**
- **End user**

## Connections

- Administrator → Admin UI: configures
- Admin UI → Client management: manages clients
- Admin UI → API management: manages APIs
- Admin UI → User and role management: manages accounts
- Admin UI → Other configuration: manages settings (evidence: `src/Aguacongas.TheIdServer.BlazorApp/App.razor.cs`)
- Client management → Client configuration: edits (evidence: `src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Client/Client.razor.cs`)
- API management → API and identity scopes: configures scopes
- User and role management → Identity stores: administers users
- End user → Account authentication: authenticates
- Account authentication → OIDC and OAuth: handles login (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Account/AccountController.cs`)
- Account authentication → Authorization consent: continues authorization
- Client application → OIDC and OAuth: requests authorization
- End user → Authorization consent: grants consent (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Consent/ConsentController.cs`)
- End user → Device authorization: confirms device (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Device/DeviceController.cs`)
- End user → CIBA requests: responds to request (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Ciba/CibaController.cs`)
- Authorization consent → API and identity scopes: presents scopes (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Consent/ConsentController.cs`)
- Device authorization → API and identity scopes: presents scopes (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Device/DeviceController.cs`)
- CIBA requests → API and identity scopes: presents scopes (evidence: `src/Aguacongas.TheIdServer.Duende/Quickstart/Ciba/CibaController.cs`)
- OIDC and OAuth → SAML 2.0: also supports
- OIDC and OAuth → WS-Federation: also supports
- Admin UI → Dynamic providers: configures providers
- OIDC and OAuth → Dynamic providers: uses provider hub
- OIDC and OAuth → Admin data store: uses configured stores
- OAuth token manager → OIDC and OAuth: discovers token endpoint (evidence: `src/IdentityServer/Aguacongas.IdentityServer/OAuthTokenManager.cs`)
- OAuth token manager → Client application: obtains access token (evidence: `src/IdentityServer/Aguacongas.IdentityServer/OAuthTokenManager.cs`)
