# identity-testing-patterns

> Claude/Codex skill by [@duendesoftware](https://omgskills.com/library/duendesoftware/index.md) · 9 stars · Updated 2026-10-16

Testing patterns for IdentityServer-based systems including integration testing with WebApplicationFactory, mock token issuance, test authority configuration, protocol response validation, and end-to-end authentication flow testing.

Tags: ai-agents, claude, claude-code

## Install

```sh
git clone https://github.com/DuendeSoftware/duende-skills /tmp/duende-skills && ln -s /tmp/duende-skills/skills/identity-testing-patterns ~/.claude/skills/identity-testing-patterns
```

## From README

Identity Testing Patterns When to Use This Skill Use this skill when: Writing integration tests for applications that issue or validate tokens using Duende IdentityServer Hosting IdentityServer in-memory with WebApplicationFactory to test grant flows end-to-end Creating mock JWT tokens for testing protected APIs without a live authority Testing custom IProfileService implementations or claim transformation logic Verifying IAuthorizationHandler and policy-based authorization against specific claim sets Testing BFF endpoints that rely on cookie-based sessions and proxied API calls Scaffolding an integration-test project from the duende-is-inmem template to test IdentityServer itself Running a post-deployment login-flow smoke test without a headless browser Core Principles Integration over unit — Test token issuance, claim mapping, and policy enforcement against a real (in-process) IdentityServer instance.

## Links

- HTML page: https://omgskills.com/library/duendesoftware/duende-skills/skills/identity-testing-patterns/
- GitHub: https://github.com/DuendeSoftware/duende-skills
- Author: [@duendesoftware](https://omgskills.com/library/duendesoftware/index.md)

## More from this repo

- [aspnetcore-authentication](https://omgskills.com/library/duendesoftware/duende-skills/skills/aspnetcore-authentication/index.md) — ASP.NET Core authentication middleware configuration including OpenID Connect, JWT Bearer, cookie authentication,...
   - [@duendesoftware](https://omgskills.com/library/duendesoftware/index.md) · 9 stars
- [aspnetcore-authorization](https://omgskills.com/library/duendesoftware/duende-skills/skills/aspnetcore-authorization/index.md) — ASP.NET Core authorization patterns including policy-based authorization, IAuthorizationHandler implementations,...
   - [@duendesoftware](https://omgskills.com/library/duendesoftware/index.md) · 9 stars
- [claims-authorization](https://omgskills.com/library/duendesoftware/duende-skills/skills/claims-authorization/index.md) — Claims transformation and profile service patterns for Duende IdentityServer — IProfileService, IClaimsTransformation,...
   - [@duendesoftware](https://omgskills.com/library/duendesoftware/index.md) · 9 stars
